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