object Main extends App {
  val Array(a, b, c) = readLine.split(" ").map(_.toInt)
  
  val x = a % b
  val result = (1 to b).toSeq.map(x * _).exists(_ % b == c)
  
  println(if (result) "YES" else "NO")
}