
fun main(args:Array<String>) {
    val (a,b,c) = readLine()!!.split(" ").map { it.toInt() }
    println(if(getAns(a,b,c)) "YES" else "NO")
}

fun getAns(a:Int, b:Int, c:Int):Boolean {
    var tmp = a
    for(i in (1..200)) {
        if(tmp % b == c) {
            return true
        }
        tmp += a
    }
    return false
}
