import Foundation
//最大公約数を求める関数
func gcd(_ num1: Int, _ num2: Int) -> Int {
   let r = num1 % num2
   if r != 0 {
       return gcd(num2, r)
   } else {
       return num2
   }
}
//３つ以上の数の最大公約数を求める
func gcdArr(_ numArr: [Int]) -> Int {
    var ans: Int = numArr[0]
    for i in numArr {
        ans = gcd(ans, i)
    }
    return ans
}

//最小公倍数を求める関数
func lcm(_ num1: Int, _ num2: Int) -> Int {
    
    var gcdNum = gcd(num1, num2)
    return num1*num2/gcdNum
}

//３つ以上の最大公約数を求める
func lcmArr(_ numArr: [Int]) -> Int {
    var ans: Int = 1
    for i in numArr {
        ans = lcm(ans, i)
    }
    return ans
}

//一次不定方程式 ax+by=gcd(a,b)を満たすa,b
func solveIdentifyEquasion(_ a: Int,_ b: Int) -> [Int]{
    var (d,d_): (Int,Int) = (a,b)
    var (x,x_) = (1,0)
    var (y,y_) = (0,1)
    var q: Int
    
    while d_ != 0 {
        q = d/d_
        (d,d_) = (d_,d%d_)
        (x,x_) = (x_,x-q*x_)
        (y,y_) = (y_,y-q*y_)
    }
    return [x,y]
}


func solveIdentifyEquasion2(_ a: Int,_ b: Int, _ c: Int) -> [Int]{
    return (solveIdentifyEquasion(a, b).map({$0 * c/gcd(a, b)}))
}

let rl = readLine()!.split(separator: " ").map({Int($0)!})
if rl[2].isMultiple(of: gcd(rl[0], rl[1])) {
    print("YES")
} else {
    print("NO")
}