#T480. 众数

众数

Description

Given N unordered positive integers ranging from 1 to 30000 in a file, where 1 ≤ N ≤ 10000, the same positive integer may appear multiple times. The integer that appears most frequently is called the mode. Determine the mode(s) and its (their) frequency of occurrence.

Input Format

The first line of the input file contains the number of positive integers N, and the second line onwards contain the N positive integers.

Output Format

The output file should contain several lines, each with two numbers. The first number is the mode, and the second number is the frequency of its occurrence.

```input1 12 2 4 2 3 2 5 3 7 2 3 4 3 ``` ```output1 2 4 3 4 ``` ## 翻译结果

CodesOnline