fn main() { let mut buf = String::new(); let mut input = { use std::io::Read; std::io::stdin().read_to_string(&mut buf).unwrap(); buf.split_whitespace() }; let trick: u64 = input.next().unwrap().parse().unwrap(); let treat: u64 = input.next().unwrap().parse().unwrap(); let output = { let mut product = 1; for i in 1..=(trick | treat) { product *= i; } product }; println!("{}", output); }