fn main() { let mut input = String::new(); std::io::Read::read_to_string(&mut std::io::stdin(), &mut input).ok(); let input: Vec = input .split_whitespace() .map(|n| n.parse().unwrap()) .collect(); let sum: u64 = input[2..].iter().sum(); if input[0] * input[1] == sum { println!("YES"); } else { println!("NO"); } }