【 Problem description 】
Given n It's an integer , Please count the number of occurrences of each integer , Output in the order of more or less occurrences .
【 Input form 】
The first line contains an integer n, Represents the number of given numbers ： The second line contains n It's an integer , Adjacent integers are separated by a space , Represents the given integer .
【 Output form 】
The output has multiple lines , Each line contains two integers , Represents a given integer and the number of times it occurs . Output in decreasing order of occurrence . If two integers appear the same number of times , Then output the smaller value first , Then the output value is larger .