function myout(text){console.log(text);}//standard output
function Main(input) {
	input = input.trim();
	//input = input.trim().split(" ");
	//input = input.trim().split("\n");
	input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  var A = input[0];
  var B = input[1];
  var C = input[2];
  for(var i = 1; i < 10000; i++){
    if(A * i % B == C){
       myout("YES");
      return;
    }
  }
  myout("NO");
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
