object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val a, b, c = sc.nextInt()
  (1 to b).find(i => (a * i) % b == c) match {
    case Some(_) => println("YES")
    case None => println("NO")
  }
}
