#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define MOD 1000000007 int main() { int n, m; cin >> n >> m; vector l(n); for (int i = 0; i < n; ++i) { cin >> l[i]; } vector cnt(200001); for (int i = 0; i < n; ++i) { cnt[l[i]]++; } for (int i = 1; i <= m; ++i) { cout << i << " " << cnt[i] << endl; } return 0; }