#t259. 众数
众数
Mode
Problem Description
Given () unordered positive integers in the range to . 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 of positive integers. Starting from the second line, there are 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.