import Foundation
func toTuple<T>(_ args: [T]) -> (T, T, T) { (args[0], args[1], args[2]) }
func readInts() -> [Int] { readLine()!.split(separator: " ").map { Int($0)! } }

let main = {
  let (a, b, c) = toTuple(readInts())
  for i in 1...b {
    if a * i % b == c { print("YES"); return }
  }
  print("NO")
}
main()
