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 d = v[1]; for &a in &v[2..] { let (mut a, mut b) = (a, d); while a != 0 { (b, a) = (a, b % a); } d /= b; } println!("{}", if d == 1 { "YES" } else { "NO" }) }