use std::io::*; use std::collections::*; fn get() -> T { let stdin = stdin(); let stdin = stdin.lock(); let s: String = stdin.bytes() .map(|c| c.unwrap() as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect(); s.parse().unwrap_or_else(|_| panic!()) } fn main() { let a: u32 = get(); let b: u32 = get(); let mut s = BTreeSet::new(); for i in 0..a+1 { for j in 0..b+1 { if i + j > 0 { s.insert(i + j*5); } } } for x in s { println!("{}", x); } }