{"raw_statement":[{"iden":"statement","content":"You open your eyes, but everything remains dark. The world is dark, and everything shakes. You realize you are locked in, but before desperation takes hold, you hear the door opening and the light invades your sight and blinds you for a few moments.\n\nThey help you out, you had been locked inside a trunk. You don't know the masked faces before you, but remember that in the last competitive programming practice they told you that \"the beginning is yet to come\". \"So this is the fabled MaratonUSP's initiation challenge\", you had heard rumors of this event, and you feel honored to be chosen.\n\nAfter walking into and abandoned building, they sit you on an old chair. The first test is to watch a soccer game without any show of excitement. Easy. The second is to install Linux on a notebook in less than 5 minutes. You were prepared, carrying the Arch Linux pendrive as usual, just in case. You face more tests, and manage to pass all of them despite a few difficulties.\n\nHours go by, the members remove their masks, and each take a coin out of their pocket. \"I won! And I even got rich\" you think, but realize they place the coins in a table in front of you, divided in two piles. Renzo, MaratonUSP's great boss, takes a chair and sits in front of you. You will play a match of Nim, and if you win you will become an honorary member of MaratonUSP, that is, you win a balloon.\n\nNim is a game of two players, alternating their turns. Two piles of coins are placed on a table and in each turn you can remove any non zero quantity of coins from one of the piles. The last player to take their turn (leaving both piles empty) wins.\n\nYou start the game. So it would not be unfair, it is guaranteed that it is possible for you to win. Write a program than beats Renzo 100% of the time.\n\nIn the first line, two integers, x and y, the size of the piles, such that 0 ≤ x, y ≤ 104. It is guaranteed that you can win the game.\n\nIn your turn, print two integers, i and x, where i is the number of the pile from which you will remove the coins (), and x is the number of coins you will remove (x ≥ 1, such that i has at least x coins).\n\nIn Renzo's turn, read two integers, in the same format as in your turn.\n\nOf course we do not do an initiation challenge like this :P\n\nIn the example, we have a pile with 2 coins and another with 1. You remove 1 coin from the first pile, and now no matter what coin Renzo removes, you can remove the other and win.\n\nRemember, after printing your play, flush the output, like: _fflush(stdout);_ in C, _cout.flush();_ in C++, or _sys.stdout.flush()_ in Python.\n\n"},{"iden":"input","content":"In the first line, two integers, x and y, the size of the piles, such that 0 ≤ x, y ≤ 104. It is guaranteed that you can win the game."},{"iden":"interaction","content":"In your turn, print two integers, i and x, where i is the number of the pile from which you will remove the coins (), and x is the number of coins you will remove (x ≥ 1, such that i has at least x coins).In Renzo's turn, read two integers, in the same format as in your turn."},{"iden":"note","content":"Of course we do not do an initiation challenge like this :PIn the example, we have a pile with 2 coins and another with 1. You remove 1 coin from the first pile, and now no matter what coin Renzo removes, you can remove the other and win.Remember, after printing your play, flush the output, like: _fflush(stdout);_ in C, _cout.flush();_ in C++, or _sys.stdout.flush()_ in Python."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ N \\in \\mathbb{Z} $ be the number of tables.  \nFor each table $ i \\in \\{1, \\dots, N\\} $, let $ (a_i, b_i) \\in \\mathbb{Z}^2 $ denote the number of used chairs $ a_i $ and total chairs $ b_i $ at table $ i $.\n\n**Constraints**  \n1. $ 1 \\leq N \\leq 100 $  \n2. For each $ i \\in \\{1, \\dots, N\\} $: $ 1 \\leq a_i \\leq b_i \\leq 100 $\n\n**Objective**  \nCompute the total number of unused chairs:  \n$$\n\\sum_{i=1}^{N} (b_i - a_i)\n$$","simple_statement":"Count the total unused chairs in the cafeteria.  \nFor each table, subtract used chairs from total chairs, then sum all unused chairs.","has_page_source":false}