Most Frequent Number
Find the most frequent value in an integer sequence. If several values tie, choose the one that appears first in the sequence.
Input
The first line contains n (1 ≤ n ≤ 100000). The second line contains n integers |aᵢ| ≤ 10^9.
Output
Print the selected value followed by its frequency.
Examples
Input #1
5
2 1 1 2 3Output #1
2 2Input #2
5
3 1 3 1 2Output #2
3 2
Comments