#T683. 众数
众数
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, followed by N positive integers starting from the second line.
Output Format
The output file consists of several lines, each containing two numbers. The first number is the mode, and the second number is the frequency of its occurrence.
CodesOnline