#include <bits/stdc++.h>
using namespace std;

int main() {
  int a,b,c;
  cin>>a>>b>>c;
  for(int i=0;i<100;i++){
    if((i*b+c)%a==0){
      cout<<"YES"<<endl;
      return 0;
    }
  }

cout<<"NO"<<endl;
  }
