{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"Two positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9...are all relatively prime to 2006.\r\u003cbr\u003e\r\u003cbr\u003eNow your job is easy: for the given integer m, find the K-th element which is relatively prime to m when these elements are sorted in ascending order.\r\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input contains multiple test cases. For each test case, it contains two integers m (1 \u0026lt;\u003d m \u0026lt;\u003d 1000000), K (1 \u0026lt;\u003d K \u0026lt;\u003d 100000000). "}},{"title":"Output","value":{"format":"HTML","content":"Output the K-th element in a single line."}},{"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\u003e2006 1\r\n2006 2\r\n2006 3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n3\r\n5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}