Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EIUPH010 - The most common number

Given an array of integers with values between 0 and 106.  Find the most occurring number.

Input

The first line is the number of elements in the array N (N<=106).

The second line contains N integers ai are the elements in the array (0 <= ai < 106 )

Output

Output the value and the number of times occur in the array. If there are many number have the same frequency, output minimum number.

Example

Input:
4
4 3 4 3

Output:
3 2

Added by:Ha Minh Ngoc
Date:2015-01-28
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYTHON3 RUBY SQLITE SWIFT VB.NET
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.