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 = [0; 601]; for i in 0..=n[0] { for j in 0..=n[1] { a[i + j * 5] += 1; } } a.iter().enumerate().skip(1).for_each(|x| { if *x.1 > 0 { println!("{}", x.0) } }); }