function main(s) {
	s = s.split("\n")[0].split(" ").map(x => Number(x));
	var x = 0;
	for (var i = 0; i < s[1]; i++) {
		if (i * s[0] % s[1] === s[2]) {x++;}
	}
	console.log(x > 0 ? "YES" : "NO");
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));

