{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"Mr. and Mrs. Smith are going to the seaside for their holiday. Before they start off, they need to choose a hotel. They got a list of hotels from the Internet, and want to choose some candidate hotels which are cheap and close to the seashore. A candidate hotel M meets two requirements:\r\u003cbr\u003e\u003col\u003e\u003cli\u003eAny hotel which is closer to the seashore than M will be more expensive than M.\r\u003cbr\u003e\u003c/li\u003e\u003cli\u003eAny hotel which is cheaper than M will be farther away from the seashore than M.\u003c/li\u003e\u003c/ol\u003e\r\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"There are several test cases. The first line of each test case is an integer N (1 \u0026lt;\u003d N \u0026lt;\u003d 10000), which is the number of hotels. Each of the following N lines describes a hotel, containing two integers D and C (1 \u0026lt;\u003d D, C \u0026lt;\u003d 10000). D means the distance from the hotel to the seashore, and C means the cost of staying in the hotel. You can assume that there are no two hotels with the same D and C. A test case with N \u003d 0 ends the input, and should not be processed."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, you should output one line containing an integer, which is the number of all the candidate hotels."}},{"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\n300 100\r\n100 300\r\n400 200\r\n200 400\r\n100 500\r\n0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}