{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":" Consider \u003ci\u003en\u003c/i\u003e distinct points on a plane.\u003cbr\u003eTwo points from that set are said to be \u003ci\u003efriends\u003c/i\u003e, when there exists a rectangle with sides parallel to coordinate axes that contains those two points and doesn\u0027t contain any other point from the given set. A rectangle is said to \u003ci\u003econtain\u003c/i\u003e a point if the point lies within the rectangle or on its border.\u003cbr\u003eHow many pairs of friends are there among the given points?\u003cbr\u003e\u003cdiv align\u003d\"left\" style\u003d\"margin-top: 1.0em;\"\u003e\u003cb\u003eInput\u003c/b\u003e\u003c/div\u003eThe first line of the input file contains an integer \u003ci\u003en\u003c/i\u003e, \u003cimg src\u003d\"CDN_BASE_URL/fb85766c999ac7c8cbbe553a490316b1?v\u003d1715610943\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e.\u003cbr\u003eThe next \u003ci\u003en\u003c/i\u003e lines contain two integers each, the coordinates of the given points. The coordinates don\u0027t exceed 10\u003csup\u003e9\u003c/sup\u003e by absolute value.\u003cbr\u003e\u003cdiv align\u003d\"left\" style\u003d\"margin-top: 1.0em;\"\u003e\u003cb\u003eOutput\u003c/b\u003e\u003c/div\u003eOutput one integer number\u0026nbsp;— the sought number of pairs of friends.\u003cbr\u003e"}},{"title":"Sample 1","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\n0 0\n0 2\n2 0\n2 2\n1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e8\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}