import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] counts = new int[m + 1]; for (int i = 0; i < n; i++) { int x = sc.nextInt(); if (x <= m) { counts[x]++; } } StringBuilder sb = new StringBuilder(); for (int i = 1; i <= m; i++) { sb.append(i).append(" ").append(counts[i]).append("\n"); } System.out.print(sb); } }