{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eAndroid Vasya attends his Chemistry classes.\r\nDuring the latest semester Vasya’s group is studying dry liquids.\r\nAt the laboratory work on mixing liquids Vasya has got oxygen oxide.\r\nAn important feature of this substance is its unpredictable consequences after mixing.\r\nThe liquid is stable only after mixing it in one to one proportion.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eVasya has got \u003ci\u003en\u003c/i\u003e test tubes, with one nano liter of oxygen oxide in each.\r\nDue to the features of the oxide Vasya pours liquids from test tube \u003ci\u003eA\u003c/i\u003e to test tube \u003ci\u003eB\u003c/i\u003e in such a way \r\nthat the resulting liquid volume in test tube \u003ci\u003eB\u003c/i\u003e doubles.\r\nTo set the experiment successfully Vasya needs to make exactly \u003ci\u003ek\u003c/i\u003e nano liters of the oxide in any of the test tubes.\r\nHelp him do this.\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 only line contains integers \u003ci\u003en\u003c/i\u003e and \u003ci\u003ek\u003c/i\u003e (1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 100\u0026nbsp;000; 1 ≤ \u003ci\u003ek\u003c/i\u003e ≤ \u003ci\u003en\u003c/i\u003e).\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 the sequence of transfers (i.\u0026nbsp;e. pouring from one test tube to another), \r\nwhich results in exactly \u003ci\u003ek\u003c/i\u003e nano liters of the oxide being in the first test tube.\r\nIn the first line output the number of transfers of the liquid \u003ci\u003em\u003c/i\u003e (0 ≤ \u003ci\u003em\u003c/i\u003e ≤ 3\u003ci\u003en\u003c/i\u003e).\r\nThen in \u003ci\u003em\u003c/i\u003e lines output pairs of integers \u003ci\u003ea\u003c/i\u003e, \u003ci\u003eb\u003c/i\u003e (1 ≤ \u003ci\u003ea\u003c/i\u003e, \u003ci\u003eb\u003c/i\u003e ≤ \u003ci\u003eN\u003c/i\u003e), \r\nmeaning that Vasya needs to pour the oxide from the test tube number \u003ci\u003ea\u003c/i\u003e to the test tube number \u003ci\u003eb\u003c/i\u003e.\r\nIf such sequence doesn’t exist output −1.\r\nIf there are several solutions output any. \r\nIt is guaranteed that if there is a sequence of transfers to get \u003ci\u003ek\u003c/i\u003e nano liters then there is one with no more than 3\u003ci\u003en\u003c/i\u003e transfers.\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\u003e5 3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\r\n2 1\r\n4 3\r\n3 1\r\n1 5\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\u003e5 5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e-1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}