/* -*- coding: utf-8 -*- * * 1032.cc: No.1032 数数え - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_L = 200000; /* typedef */ /* global variables */ int cs[MAX_L + 1]; /* subroutines */ /* main */ int main() { int n, m; scanf("%d%d", &n, &m); for (int i = 0; i < n; i++) { int l; scanf("%d", &l); cs[l]++; } for (int i = 1; i <= m; i++) printf("%d %d\n", i, cs[i]); return 0; }