import scala.io.StdIn._

object Main{
    def main(args:Array[String]){
        val s  = readLine.split(" ").map(_.toInt)
        var f = false
        for (i <- 1 to s(1)) {
            if (s(0) * i % s(1) == s(2)) {
                f = true
            }
        } 
        if (f) {
            printf("YES\n")
        } else {
            printf("NO\n")
        }
    }
}