const fn gcd(a: u64, b: u64) -> u64 { let mut x = (a, b); while x.1 > 0 { x = (x.1, x.0 % x.1); } x.0 } fn main() { let mut xx = String::new(); std::io::stdin().read_line(&mut xx).ok(); let xx: Vec = xx.split_whitespace().flat_map(str::parse).collect(); let gcd = gcd(xx[0], xx[1]); let mut b = xx[1] / gcd; while b % 2 == 0 { b /= 2; } while b % 5 == 0 { b /= 5; } if b == 1 { println!("No"); } else { println!("Yes"); } }