시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 (추가 시간 없음) 1024 MB89876470486.275%

문제

There are three types of shots in basketball: 1 pointer (free throw), 2 pointers, and 3 pointers.

Given how many shots of each type two teams made, determine the winner.

입력

The first input line contains three integers (each between 0 and 99 inclusive), indicating how many shots of each type Team1 made. The first integer indicates 1-pointer shots, the second integer indicates 2-pointer shots, and the third integer indicates 3-pointer shots.

The second input line provides the shots made by Team2, following the same format as the first input line.

출력

Print 1, 2 or 0 (zero), indicating which team won or if the game was a tie. The team with higher score (total points) wins. If both teams have the same total points, then the game is a tie.

예제 입력 1

10 20 30
50 10 10

예제 출력 1

1

Score (total points) for Team1 is 140 and for Team2 is 100, so Team1 wins.

예제 입력 2

5 5 5
1 99 1

예제 출력 2

2

예제 입력 3

1 2 3
0 1 4

예제 출력 3

0