#include<iostream>
using namespace std;
int a,b,c;
int main()
{
	cin>>a>>b>>c;
	for(int i=a;i<=100000;i+=a)
	{
		if(i%b==c)
		{
			cout<<"YES"<<endl;
			return 0;
		}
	}
	cout<<"NO"<<endl;
	return 0;
}