import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int n = Integer.parseInt(sa[0]); int m = Integer.parseInt(sa[1]); sa = br.readLine().split(" "); int[] ans = new int[200001]; for (int i = 0; i < n; i++) { int l = Integer.parseInt(sa[i]); ans[l]++; } br.close(); PrintWriter pw = new PrintWriter(System.out); for (int i = 1; i <= m; i++) { pw.println(i + " " + ans[i]); } pw.flush(); } }