import java.util.*;

object MainKt {
  fun gcd(a:Int,b:Int) :Int = if(b==0) {a} else{
    gcd(b,a%b)
  }
  @JvmStatic fun main(args:Array<String>) {
  val (A,B,C) = readLine()!!.split(" ").map(String::toInt)
  println(if(C % gcd(A,B)==0) {"YES"} else {"NO"})
  }
}