#include using namespace std; int main() { int N, M; cin >> N >> M; vector L( N ); for( int i = 0; i < N; i++ ) { cin >> L[i]; } vector ans( M ); for( int i = 0; i < N; i++ ) { int n = L[i] - 1; if( n >= M ) continue; ans[n]++; } for( int i = 0; i < M; i++ ) { cout << i + 1 << " " << ans[i] << endl; } }