#include <bits/stdc++.h>
using namespace std;
int main(){
	int a, b, c; cin >> a >> b >> c;
	for(int i = 1; i <= 200; i++) if((i*a)%b == c) return cout << "YES" << endl, 0;
	cout << "NO" << endl;
	return 0;
}
