#include <iostream>
using namespace std;
typedef long long ll;
ll a,b,c;
int main()
{
    cin>>a>>b>>c;
    for(int i=1;i<=10000000;i++)
    {
        if((i*a)%b==c)
        {
            cout<<"YES\n";
            return 0;
        }
    }
    cout<<"NO\n";
    return 0;
}
