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