object Main extends App {
  val input = io.Source.stdin.getLines.toSeq.head.split(' ').map(_.toLong)
  val a=input(0)
  val b=input(1)
  val c=input(2)
  private def func():String={
  	var i=0;
  	while(i < a*b){
      if((b*i+c) % a == 0) return "YES"
      i += 1
  	}
    "NO"
  }
  println(func())
}
