fun main(args: Array<String>) {
    val (a, b, c) = readLine()!!.split(' ').map { it.toInt() }
    var k = 1
    val used = mutableSetOf<Int>()

    while (true) {
        val ak = a * k
        val rem = ak % b
        if (rem == c) {
            println("YES")
            return
        }
        if (used.contains(rem)) {
            break
        } else {
            used.add(rem)
        }
        k++
    }
    println("NO")
}