main = getContents >>= putStrLn . solve . map read . words solve (n:a:xs) = if n * a == sum xs then "YES" else "NO"