use std::{ collections::HashMap, io::{stdout, BufWriter, Read, Write}, }; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let v: Vec = s.split_whitespace().flat_map(str::parse).collect(); let mut h = HashMap::new(); for &l in &v[2..] { *h.entry(l).or_insert(0) += 1; } let mut w = BufWriter::new(stdout()); (1..=v[1]) .for_each(|i| writeln!(w, "{} {}", i, h.get(&i).unwrap_or(&0)).unwrap()) }