use std::collections::BTreeSet; fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let n: Vec<_> = s.split_whitespace().flat_map(str::parse).collect(); let mut a = BTreeSet::new(); for i in 0..=n[0] { for j in 0..=n[1] { a.insert(i + j * 5); } } a.iter().skip(1).for_each(|x| println!("{}", x)); }