#include char buf[2000000]; char *p = buf; int ri() { int r = 0, s = 0; for (;;) { if (*p == '-') { s = 1; break; } if (*p <= '9' && *p >= '0') { r = *p - '0'; break; } p++; } p++; for (;;) { if (*p < '0' || *p > '9') break; r = r * 10 + *p - '0'; p++; } p++; if (s) r = -r; return r; } int main() { fread(buf, sizeof(buf), 1, stdin); int n = ri(); int m = ri(); int res[m + 1] = { 0 }; for (int i = 0; i < n; i++) { int x = ri(); if (x <= m) res[x]++; } for (int i = 1; i <= m; i++) printf("%d %d\n", i, res[i]); return 0; }