407053: GYM102697 024 Missed Basketball Game

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

024. Missed Basketball Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

While you were at science olympiad, you missed your favorite basketball team's biggest game of the year. You don't know the score, but you know the number of baskets, three-pointers, and free throws made by each team. Your task is to figure out which team won the game based on the given information. Recall that a three-pointer is worth 3 points, a regular basket is worth 2 points, and a free throw is worth one point. The number of baskets made includes three-pointers and two-pointers, but not free throws.

Input

The first line of input contains two space-separated strings: the names of the two teams that played in the basketball game. The second line of input contain two space-separated integers representing the number of baskets made by each team, respectively. The third line of input contain two space-separated integers representing the number of three-pointers made by each team, respectively. The fourth line of input contain two space-separated integers representing the number of free throws made by each team, respectively.

Output

Output a single string: the team that won the game. It is guaranteed that there is a winner, i.e. the score at the end of the game is not a tie.

ExampleInput
Syracuse Duke
35 31
11 9
14 20
Output
Syracuse
Note

In the example, Syracuse scored 95 points, and Duke scored 91 points. This game occurred on January 14, 2019.

加入题单

算法标签: