It's Christmas season and Santa is training a new class of elves to carry out the logistics and operations of delivering presents. The class of 2021 has students.
Before Santa starts instructing, he would like to conduct a survey on the heights of all students. Naturally, there are different tasks at the North Pole which tall and short people are better suited for.
Since is large, he requires your assistance to write a program to determine the height of the shortest and tallest student. Can you help Santa?
Input Specification
The first line contains .
The next lines each contain an integer , representing the height of the -th student.
Output Specification
Output two values on separate lines, the height of the shortest and tallest student, respectively.
Sample Input
5
3
6
7
1
2
Sample Output
1
7
Explanation
The heights of the students are .
The first line of output represents the height of the shortest student - .
The second line of output represents the height of the tallest student - .
Comments