object Main extends App{
def check():Boolean = {
  val Array(a,b,c) = scala.io.StdIn.readLine.split("\\s").map(_.toInt)
  for (i<-1 to b){
    if ((a*i) % b == c) return true
  }
  return false  
}

if (check()) println("YES") else println("NO")
}