import java.util.*

val sc = Scanner(System.`in`)
val A = sc.nextInt()
val B = sc.nextInt()
val C = sc.nextInt()

fun main(args: Array<String>) {
    println(if (judge()) "YES" else "NO")
}

fun judge(): Boolean {
    for (i in 0 until B) {
        if (A * i % B == C) {
            return true
        }
    }
    return false
}
