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