#t259. 众数

众数

Mode

Problem Description

Given NN (1≤N≤100001 \le N \le 10000) unordered positive integers in the range 11 to 3000030000. The same integer may appear multiple times; the integer that appears most frequently is called the mode. Find the mode(s) and how many times it/they appear. If several numbers are all modes, output them in increasing order.

Input Format

The first line of input is the number NN of positive integers. Starting from the second line, there are NN positive integers.

Output Format

Output several lines, each containing two numbers: the first is a mode and the second is how many times it appears, separated by two spaces.

Sample Input

12
2 4 2 3 2 5 3 7 2 3 4 3

Sample Output

2  4
3  4

Hint

The two numbers on each output line are separated by exactly two spaces.