
import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val a, b, c = sc.nextInt()

  println(solve(a, b, c))

  def solve(a : Int, b: Int, c: Int): String = {

    for (i <- 1 to 100) {
      if ((a * i) % b == c) {
        return "YES"
      }
    }
    "NO"
  }
}
