"use strict";

var main = function main(input) {
  var args = input.split(' ');
  var A = parseInt(args[0], 10);
  var B = parseInt(args[1], 10);
  var C = parseInt(args[2], 10);
  ;
  var start = A % B; // console.log(`start:${start}`);

  var now = A;
  var flag = false;

  do {
    // console.log(`now:${now}`);
    if (now % B == C) {
      flag = true;
    }

    now += A; // console.log(now);
  } while (now % B != start);

  if (flag) {
    console.log("YES");
  } else {
    console.log("NO");
  }
};

main(require('fs').readFileSync('/dev/stdin', 'utf-8'));