Олимпиадный тренинг

Задача 38703. List of Sergei Nikolaevich - 3


Sergey Nikolaevich likes to study statistics. At his disposal came across a list of the growth of all the students of the lyceum. To his chagrin, all the data was written in random order and, moreover, took up several pages. Sergey Nikolaevich wants to determine how many students have the same height as the tallest student, and also how many students have the same height as the shortest student. Sergei Nikolaevich asked you to write a program for him that would solve this problem.

Input
The first line contains the number N - the number of people in the list (1<N<=105). The second line contains N numbers - the age of the people in the list (each number in the range from 100 to 220).

Imprint
Print two numbers on the same line separated by a space: how many students have the same height as the tallest student, and how many students have the same height as the shortest student.
 
Examples
# Input Output
1
10
212 107 165 205 122 116 177 212 107 212
3 2

Запрещенные операторы:max;min;count