main = do
    s <- product . map read . words <$> getLine
    a <- sum . map read . words <$> getLine
    putStrLn $ if s == a then "YES" else "NO"