{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eIt was the middle of the 23rd century. Alien creatures suddenly came out from hyperspace\r\nand attacked the Twenty-fifth colonization mission just when all its \r\nmembers gathered in a concert of one of the most popular singers in the \r\nwhole Galaxy. Nearly a third of all mission members died during \r\nthe ensuing panic and chaos.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eSince then control of hyperspace has become one of the highest priorities \r\nof the Defense Forces. Automatic drones with hyperspace field vibration amplitude sensors\r\nwere sent to the farthest corners of the inhabited part of the Galaxy. However, \r\ncollecting data from them turned out to be a quite complicated technical problem. \r\nThe point is that a huge amount of energy is required to transmit data at such distances \r\nwithout distortion. Even the usage of intermediary retransmitters doesn’t improve the \r\nsituation much. However, engineers managed to find a sufficiently elegant solution. \r\nThe retransmitter sends not the measured value, but an absolute \r\nvalue of the difference between the measured value and some reference value, which is imprinted in the \r\nmemory of this retransmitter. These reference numbers are chosen in such a way that for the \r\nnormal vibration level detected by sensor the final retransmitter in chain should send \r\na number that is close to zero. So, when the final retransmitter sends the number that is strictly \r\ngreater than one, the hyperspace disturbance is assumed to have happened. Security \r\nexperts are interested how reliable the system of \u003ci\u003ek\u003c/i\u003e retransmitters is, and what range of\r\nsensor readings will be interpreted as a calm state of hyperspace field. You are delegated to \r\nstudy this question.\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\u003ek\u003c/i\u003e that is the total number of retransmitters (1 ≤ \u003ci\u003ek\u003c/i\u003e ≤ 10).\r\nThe second line contains integers \u003ci\u003ea\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e, …, \u003ci\u003ea\u003c/i\u003e\u003csub\u003e\u003ci\u003ek\u003c/i\u003e\u003c/sub\u003e that are the \r\nreference values recorded in the memory of retransmitters in the order the signal \r\nfollows from the hyperspace field sensor to the receiver on the \r\nscout ship (−1000 ≤ \u003ci\u003ea\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ 1000). \u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eIn the first line output the integer \u003ci\u003en\u003c/i\u003e that is the amount of segments in answer.\r\nIn the \u003ci\u003ei\u003c/i\u003e\u0027th of the following \u003ci\u003en\u003c/i\u003e lines output integers \u003ci\u003el\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ \u003ci\u003er\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e that are the bounds of the \u003ci\u003ei\u003c/i\u003e\u0027th segment.\r\nThe segments must be output in the ascending order of coordinates and without mutual intersections.\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\u003e3\r\n0 4 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\r\n-7 -5\r\n-3 -1\r\n1 3\r\n5 7\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}