#include <iostream>
using namespace std;

int a, b, c;

int main() {
	cin >> a >> b >> c;
	for (int k = 0; k != b; ++k)
		if (k * a % b == c) {
			cout << "YES\n";
			return 0;
		}
	cout << "NO\n";
	return 0;
}
