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(); Map freqMap = new HashMap<>(); for(int i = 0; i < n; i++) { int num = sc.nextInt(); if(num > m) continue; freqMap.put(num, freqMap.getOrDefault(num, 0) + 1); } for(int i = 1; i <= m; i++) System.out.println(i + " " + freqMap.getOrDefault(i, 0)); } }