object Main extends App {
	val line = scala.io.StdIn.readLine
	val A = line.split(" ")(0).toInt
	val B = line.split(" ")(1).toInt
	val C = line.split(" ")(2).toInt

	var list: List[Int] = List();

	for(i<-0 to B){
		list = A*i%B :: list
	}

	if(list.contains(C)){
		println("YES")
	}else{
		println("NO")
	}
}