#include using namespace std; int main() { int n, m; cin >> n >> m; vector v(m); for (int i = 0; i < n; i++) { int l; cin >> l; if (l - 1 >= m) continue; v.at(l - 1)++; } for (int i = 0; i < m; i++) { cout << i + 1 << " " << v.at(i) << endl; } }