fun main(args: Array<String>) {
    val (A, B, C) = readLine()!!.split(" ").map(String::toInt)

    for (i in 1..B) {
        if (A * i % B == C) {
            println("YES")
            return
        }
    }
    println("NO")
}

