fn main() { let mut xx = String::new(); std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok(); let xx: Vec = xx.split_whitespace().flat_map(str::parse).collect(); let h = xx[1]; let mut product = 1; for &x in &xx[2..] { product *= x; product %= h; if product == 0 { println!("YES"); return; } } println!("NO"); }