#include using namespace std; int main() { int N, M, L; cin >> N >> M; map MA; while (cin >> L) MA[L]++; for (int i = 1; i <= M; i++) cout << i << " " << MA[i] << "\n"; }