function Main(s) {
  var s = s.split("\n")[0].split(" ").map(e => e*1);
  var backet = new Array(s[1]).fill(0);
  var check = s[0] % s[1], a = s[0];
  backet[check] = 1;
  while(backet[check] < 2) {
    s[0] += a;
    check = s[0] % s[1];
    backet[check]++;
  }
  console.log(backet[s[2]] >= 1 ? "YES":"NO");
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));