
fun main(args: Array<String>) {
    val (a, b, c) = readLine()!!.split(' ').map(String::toInt)
    val t = gcd(a, b)
    val ret = (a % b - c) % t == 0
    print(if (ret) "YES" else "NO")

}

tailrec fun gcd(a : Int, b: Int): Int {
    if(a == 0) return b
    if(b == 0) return a
    if(a > b) return gcd(a%b, b)
    return gcd(b%a, a)
}