402880: GYM100935 A Time

Memory Limit:64 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Timetime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output

A plane can go from city X to city Y in 1 hour and 20 minutes. However, when it returns from city Y to city X, with the same speed, it spends only 80 minutes! If you don’t know how might that happen, just remember that 1 hour and 20 minutes is the same as 80 minutes ;-) In this problem you will have 2 durations of time and you have to decide if they are equal or not.

Input

The first line will be the number of test cases T. Each test case has two lines, the first line represents the first duration and contains 3 integers: h, m, s; these are the Hours, Minutes and Seconds. The second line represent the second duration with 3 integers also, in the same way. All integers are positive and below 5000.

Output

For each test case, print one line which contains the number of the test case. Then print “Yes” if the 2 durations are equal and print “No” otherwise, see the samples and follow the output format.

ExamplesInput
3
1 20 0
0 80 0
0 2 10
0 0 130
2 10 5
2 11 0
Output
Case 1: Yes
Case 2: Yes
Case 3: No

加入题单

上一题 下一题 算法标签: