Semyon Igorevich is the head of the programming club. The students from his club went to an off-site programming contest by the sea at the famous educational center "Cassiopeia". Unfortunately, Semyon Igorevich could not attend the contest, and his students decided to send him greetings from the sea by sending beautiful paper postcards.
Each of the $$$n$$$ students bought a postcard, each postcard being a rectangle with a height of $$$h_i$$$ and a width of $$$w_i$$$. To optimize the sending of postcards, the students decided to buy one large envelope and put all the postcards in it one atop of the other. The envelope is a rectangle with a height of $$$H$$$ and a width of $$$W$$$. A postcard is placed in the envelope such that the sides of the postcard are parallel to the sides of the envelope. A postcard can be rotated by $$$90^\circ$$$. A postcard fits in the envelope if its sides do not exceed the corresponding parallel sides of the envelope.
The students want the purchased envelope to have the minimum area $$$H \cdot W$$$.
Determine the height and width of the envelope so that all postcards can be placed in it and its area is minimized.
The first line contains an integer $$$n$$$, $$$1 \le n \le 10^{5}$$$ — the number of students. In the following $$$n$$$ lines, the height and width of each postcard $$$h_{i}$$$ and $$$w_{i}$$$ are given, ($$$1 \le h_{i}, w_{i} \le 10^{9}$$$).
Output two integers $$$H$$$ and $$$W$$$ — the height and width of the suitable envelope. If the sides are not equal, output the smaller side first.
31 23 14 2
2 4
21 12 2
2 2