{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cspan lang\u003d\"en-us\"\u003e\u003cp\u003eA lattice point (\u003ci\u003e\u003cb\u003ex\u003c/b\u003e\u003c/i\u003e, \u003ci\u003e\u003cb\u003ey\u003c/b\u003e\u003c/i\u003e) in the first quadrant (\u003ci\u003e\u003cb\u003ex\u003c/b\u003e\u003c/i\u003e and \u003ci\u003e\u003cb\u003ey\u003c/b\u003e\u003c/i\u003e are integers greater than or equal to 0), other than the origin, is visible from the origin if the line from (0, 0) to (\u003ci\u003e\u003cb\u003ex\u003c/b\u003e\u003c/i\u003e, \u003ci\u003e\u003cb\u003ey\u003c/b\u003e\u003c/i\u003e) does not pass through any other lattice point. For example, the point (4, 2) is not visible since the line from the origin passes through (2, 1). The figure below shows the points (\u003ci\u003e\u003cb\u003ex\u003c/b\u003e\u003c/i\u003e, \u003ci\u003e\u003cb\u003ey\u003c/b\u003e\u003c/i\u003e) with 0 ≤ \u003ci\u003e\u003cb\u003ex\u003c/b\u003e\u003c/i\u003e, \u003ci\u003e\u003cb\u003ey\u003c/b\u003e\u003c/i\u003e ≤ 5 with lines from the origin to the visible points.\u003c/p\u003e\u003ccenter\u003e\u003cimg src\u003d\"CDN_BASE_URL/df136192ea0282d99ffbfa2d5d0c5330?v\u003d1715548831\"\u003e\u003c/center\u003e\u003cp\u003eWrite a program which, given a value for the size, \u003ci\u003e\u003cb\u003eN\u003c/b\u003e\u003c/i\u003e, computes the number of visible points (\u003ci\u003e\u003cb\u003ex\u003c/b\u003e\u003c/i\u003e, \u003ci\u003e\u003cb\u003ey\u003c/b\u003e\u003c/i\u003e) with 0 ≤ \u003ci\u003e\u003cb\u003ex\u003c/b\u003e\u003c/i\u003e, \u003ci\u003e\u003cb\u003ey\u003c/b\u003e\u003c/i\u003e ≤ \u003ci\u003e\u003cb\u003eN\u003c/b\u003e\u003c/i\u003e.\u003c/p\u003e\u003c/span\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cspan lang\u003d\"en-us\"\u003e\u003cp\u003eThe first line of input contains a single integer \u003ci\u003e\u003cb\u003eC\u003c/b\u003e\u003c/i\u003e (1 ≤ \u003ci\u003e\u003cb\u003eC\u003c/b\u003e\u003c/i\u003e ≤ 1000) which is the number of datasets that follow.\u003c/p\u003e\u003cp\u003eEach dataset consists of a single line of input containing a single integer \u003ci\u003e\u003cb\u003eN\u003c/b\u003e\u003c/i\u003e (1 ≤ \u003ci\u003e\u003cb\u003eN\u003c/b\u003e\u003c/i\u003e ≤ 1000), which is the size.\u003c/p\u003e\u003c/span\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each dataset, there is to be one line of output consisting of: the dataset number starting at 1, a single space, the size, a single space and the number of visible points for that size.\u003c/p\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\u003e4\r\n2\r\n4\r\n5\r\n231\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 2 5\r\n2 4 13\r\n3 5 21\r\n4 231 32549\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}