solve [] b c acc = acc `mod` b == c
solve (e:es) b c acc = acc `mod` b == c || solve es b c (acc+e)

main = do
  [a,b,c] <- map read . words <$> getLine
  let seq = replicate b a
    in putStrLn (if solve seq b c 0 then "YES" else "NO")
