{"raw_statement":[{"iden":"statement","content":"In a country trip, the contestants decided to play a soccer match. Yan, who was a professional player once, decided not to play to keep the teams balanced. He wanted to participate in another way, so he decided to choose the two teams.\n\nUnfortunately, unlike soccer, Yan is very bad at math and doesn't know if he divided the teams fairly. Yan considers a division fair if the absolute difference between the number of players in each team is minimum. Can you help him?\n\nThe first line has a single integer T, the number of test cases. The next T lines have two integers a and b, the number of players in each team.\n\nPrint T lines, one for each test case.\n\nIf Yan was fair, output the word \"Ok\".\n\nIf Yan wasn't fair, output two integers x and y, x ≤ y, the sizes of the teams in a fair division.\n\n"},{"iden":"input","content":"The first line has a single integer T, the number of test cases. The next T lines have two integers a and b, the number of players in each team.  1 ≤ T ≤ 1000.  0 ≤ a, b ≤ 109. "},{"iden":"output","content":"Print T lines, one for each test case.If Yan was fair, output the word \"Ok\".If Yan wasn't fair, output two integers x and y, x ≤ y, the sizes of the teams in a fair division."}],"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\\} $, let $ a_k, b_k \\in \\mathbb{Z}^+ $ denote the number of players in the two teams.\n\n**Constraints**  \n1. $ 1 \\le t \\le 1000 $  \n2. $ 1 \\le a_k, b_k \\le 1000 $ for all $ k \\in \\{1, \\dots, t\\} $\n\n**Objective**  \nFor each test case $ k $:  \n- Let $ s = a_k + b_k $ be the total number of players.  \n- A fair division minimizes the absolute difference between team sizes.  \n- If $ s $ is even, the fair division is $ \\left( \\frac{s}{2}, \\frac{s}{2} \\right) $.  \n- If $ s $ is odd, the fair division is $ \\left( \\left\\lfloor \\frac{s}{2} \\right\\rfloor, \\left\\lceil \\frac{s}{2} \\right\\rceil \\right) $.  \n\nLet $ x_k = \\left\\lfloor \\frac{a_k + b_k}{2} \\right\\rfloor $, $ y_k = \\left\\lceil \\frac{a_k + b_k}{2} \\right\\rceil $.  \n- If $ (a_k, b_k) = (x_k, y_k) $ or $ (b_k, a_k) = (x_k, y_k) $, output **\"Ok\"**.  \n- Otherwise, output $ x_k $ and $ y_k $ with $ x_k \\le y_k $.","simple_statement":"Given two integers a and b, representing team sizes, check if the difference is minimal.  \nIf yes, print \"Ok\".  \nIf no, print the two smallest possible team sizes x and y (x ≤ y) that minimize the absolute difference.","has_page_source":false}