#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
map <int, int> cnt;
void bj(int n) {
int maxx = 0;
int a;
for (int i = 1; i <= n; ++i) {
cin >> a;
++cnt[a];
maxx = max(maxx, a);
}
for (int i = 1; i <= maxx; ++i)
if (cnt[i] >= 1) cout << i << " " << cnt[i] << "\n";
}
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
bj(n);
return 0;
}
都没有大佬帮帮蒟蒻QAQ