{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eLegendary characters of mathematical problems Alice and Bob played together so often and in so many games that there was no avoiding a flicker of sympathy between them, which was then kindled into flame of love by the wind of time. Nowadays they have been living together for some years and searching for the new strategies. Sometimes in their life there are some prosaic events, and this problem will tell you about one of them.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOnce Bob counted the money of the family budget and found a shortage of 10\u003csup\u003e12\u003c/sup\u003e conventional units. He thought that part of it could be spent by Alice. When she came home in a new dress and shoes (which only increased Bob’s suspicions), he asked her how much money she took from the family budget. Alice did not say the amount directly, but suggested Bob to play a game, during which he would be able to find out the required number. Of course, Bob could not resist.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eHere are the rules of this game. Alice has an integer \u003ci\u003ex\u003c/i\u003e (1 ≤ \u003ci\u003ex\u003c/i\u003e ≤ 10\u003csup\u003e12\u003c/sup\u003e). The game consists of \u003ci\u003en\u003c/i\u003e moves. On each move Bob asks Alice if the number \u003ci\u003ex\u003c/i\u003e is divided by some positive integer \u003ci\u003ed\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e. Then Alice answers Bob’s question. After that Bob should suggest any possible integer \u003ci\u003ex\u003c/i\u003e\u0027\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e (1 ≤ \u003ci\u003ex\u003c/i\u003e\u0027\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ 10\u003csup\u003e12\u003c/sup\u003e), which satisfies all the information received (including information obtained from the previous moves), or say that such \u003ci\u003ex\u003c/i\u003e\u0027\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e does not exist.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eBob himself chose what questions he would ask, but the task of determining the possible number \u003ci\u003ex\u003c/i\u003e\u0027\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e after each move is too difficult for him. Help Bob to do it.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe first line contains an integer \u003ci\u003en\u003c/i\u003e that is the number of moves (1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 10\u003csup\u003e5\u003c/sup\u003e).\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eIn following \u003ci\u003en\u003c/i\u003e lines there is a description of the moves. Each move is described by integers \u003ci\u003ed\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e and \u003ci\u003et\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e \u003cnobr\u003e(1 ≤ \u003ci\u003ed\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ 10\u003csup\u003e6\u003c/sup\u003e;\u003c/nobr\u003e \u003ci\u003et\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e\u0026nbsp;∈\u0026nbsp;{0,\u0026nbsp;1}). If the Alice’s answer is positive, then \u003ci\u003et\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e equals 1. If the answer is negative, then \u003ci\u003et\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e equals 0.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOutput \u003ci\u003en\u003c/i\u003e lines that describe Bob’s answers on each move. Each line must contain either integer \u003ci\u003ex\u003c/i\u003e\u0027\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e (1 ≤ \u003ci\u003ex\u003c/i\u003e\u0027\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ 10\u003csup\u003e12\u003c/sup\u003e) or -1 if there is no suitable \u003ci\u003ex\u003c/i\u003e\u0027\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n10 1\r\n5 0\r\n100500 0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e100500\r\n-1\r\n-1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e6\r\n2 1\r\n5 0\r\n3 1\r\n1 1\r\n5 1\r\n100500 0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e12\r\n12\r\n12\r\n12\r\n-1\r\n-1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e6\r\n1000000 1\r\n999999 1\r\n2 0\r\n999998 1\r\n999997 1\r\n999996 1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e999999000000\r\n999999000000\r\n-1\r\n-1\r\n-1\r\n-1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}