{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to the right of the given star. Astronomers want to know the distribution of the levels of the stars.\r\n\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_centered_picture\"\u003e\u003cimg src\u003d\"CDN_BASE_URL/b88a0d9c1926e5b6a60ac07437c6b8ce?v\u003d1726120296\" border\u003d\"0\" alt\u003d\"Problem illustration\"\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eFor example, look at the map shown on the figure above. Level of the star number 5 is equal to 3 (it\u0027s formed by three stars with a numbers 1, 2 and 4). And the levels of the stars numbered by 2 and 4 are 1. At this map there are only one star of the level 0, two stars of the level 1, one star of the level 2, and one star of the level 3.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eYou are to write a program that will count the amounts of the stars of each level on a given map.\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 a number of stars (1 ≤ \u003ci\u003eN\u003c/i\u003e ≤ 15000). The following \u003ci\u003eN\u003c/i\u003e lines contain integers \u003ci\u003eX\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e and \u003ci\u003eY\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e that are coordinates of stars (\u003cnobr\u003e0 ≤ \u003ci\u003eX\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e, \u003ci\u003eY\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e ≤ 32000\u003c/nobr\u003e). There can be only one star at one point of the plane. Stars are listed in ascending order of \u003ci\u003eY\u003c/i\u003e coordinate. Stars with equal \u003ci\u003eY\u003c/i\u003e coordinates are listed in ascending order of \u003ci\u003eX\u003c/i\u003e coordinate.\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 integers, one per line. The first line should contain an amount of stars of the level 0, the second does an amount of stars of the level 1 and so on, the last line contains an amount of stars of the level \u003ci\u003eN\u003c/i\u003e\u0026nbsp;−\u0026nbsp;1.\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\r\n1 1\r\n5 1\r\n7 1\r\n3 3\r\n5 5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n2\r\n1\r\n1\r\n0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}