use std::{collections::HashMap, io::Read}; 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; } for i in 1..=v[1] { println!("{} {}", i, h.entry(i).or_default()); } }