
'use strict'

function main(input) {
  input = input.split(' ').map(V => ~~V)
  const a = input[0] //aの倍数
  const b = input[1] //bで割る
  const c = input[2] //割った余り

  let i = 0
  while (i <= a * b) {
    if ((i * a) % b == c) {
      console.log('YES')
      return
    }
    // console.log(i)

    i++
  }
  console.log('NO')
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));