object Main extends App{
    val Array(a,b,c) = scala.io.StdIn.readLine.split(" ").map(_.toInt)
    
    val surplus_series = (1 to 100).map(_*a).map(_%b).distinct.filter(_ <= c).sorted
    
    //println(surplus_series)
    
    if(0 < surplus_series.count(_%c==0)) println("YES") else println("NO")
}
