use std::io::Read; fn solve(a: usize, b: usize) { let divisors: Vec = (1..=a).filter(|i| a % i == 0).collect(); let yes: bool = (1..=100) .filter(|i| i % b == 0) .any(|i| divisors.contains(&i)); if yes { println!("{}", "YES"); } else { println!("{}", "NO"); } } fn main() { let mut ab = String::new(); std::io::stdin().read_to_string(&mut ab).ok(); let ab: Vec = ab.trim().split('\n').next().unwrap().trim().split_whitespace() .map(|i| i.parse::().unwrap()) .collect(); solve(ab[0], ab[1]); }