"use strict"
const Main = (input) =>{
  let xs = input.trim().split(" ").map(v=>parseInt(v,10));
    let A = xs[0];
    let B = xs[1];
    let C = xs[2];
    let ans = "NO";
      for(let i = 0; i <= B; i++)
        if(A*i%B==C){
        ans = "YES";
        }
    console.log(ans);
  }
Main(require("fs").readFileSync("/dev/stdin","utf8"));