{"raw_statement":[{"iden":"statement","content":"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.\n\nThe 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.\n\nFor 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.\n\n"},{"iden":"input","content":"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."},{"iden":"output","content":"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."},{"iden":"examples","content":"Input31 20 00 80 00 2 100 0 1302 10 52 11 0OutputCase 1: YesCase 2: YesCase 3: No"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, T\\} $:  \n- First duration: $ (h_1, m_1, s_1) \\in \\mathbb{Z}_{>0}^3 $  \n- Second duration: $ (h_2, m_2, s_2) \\in \\mathbb{Z}_{>0}^3 $  \n\n**Constraints**  \n1. $ 1 \\le T \\le \\text{unspecified} $  \n2. For all $ i \\in \\{1,2\\} $: $ 0 < h_i, m_i, s_i < 5000 $  \n\n**Objective**  \nFor each test case $ k $, determine if the two durations are equal:  \n$$\n3600 \\cdot h_1 + 60 \\cdot m_1 + s_1 = 3600 \\cdot h_2 + 60 \\cdot m_2 + s_2\n$$  \nOutput \"Yes\" if equal, \"No\" otherwise.","simple_statement":"Given two time durations in hours, minutes, and seconds, determine if they are equal.","has_page_source":false}