{"problem":{"name":"A. Time","description":{"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,","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":65536},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10093A"},"statements":[{"statement_type":"Markdown","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## Input\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\n## Output\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[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**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.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10093A","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}