#include using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n, m; cin >> n >> m; vector cnt(m, 0); for (int i = 0; i < n; ++i) { int l; cin >> l; --l; if (l < m) ++cnt[l]; } for (int i = 0; i < m; ++i) { cout << i + 1 << " " << cnt[i] << "\n"; } return 0; }