Element Frequency Count
Count every distinct array value.
Input
The first line contains n. The second line contains n integers.
Array and query counts are between $1$ and $10^5$. Integer values are between $-10^9$ and $10^9$. Deleting a missing multiset value has no effect.
Output
Print x f for each distinct x in increasing order, where f is its frequency.
Example
Input
7
4 2 4 6 2 3 6
Output
2 2
3 1
4 2
6 2
Comments