You are given N (0 < N < 100) line segments on a line. Every segment is defined with its endpoints A_{i} and B_{i} (A_{i} ≠ B_{i}, 1 ≤ i ≤ N). The endpoints are integer coordinates in the interval [−999, 999]. Some of the segments probably intersect. Write a program, which removes minimum number of the given segments, so that none of the left segments have common interior point.
Input
The first line of input contains the integer N. Each of the following N lines, contains two integers (A_{i} and B_{i}), separated with one space.
Output
On the first line write the integer P, equal to the number of segments, which are left after your program removes the excess segments. The following P lines should contain the coordinates of the left and the right endpoints of the segments which are left. These coordinates must be separated with one space. Coordinates of the left endpoints must be written in their ascending order. If the problem has more the one solution, write only one of them no matter which.
Sample
input  output 

3
6 3
1 3
2 5
 2
1 3
3 6

Problem Source: Bulgarian National Olympiad Day #2