#include using namespace std; using ll = long long; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) (void(0)) #endif void run_case(); int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int T = 1; // cin >> T; while (T--) run_case(); return 0; } void run_case() { int N, M; cin >> N >> M; vector cnt(M); while(N--) { int x; cin >> x; if(x <= M)cnt[--x]++; } for(int i = 0; i < M; i++) cout << i + 1 << " " << cnt[i] << "\n"; }