#include<cstdio>
#include<queue>
#include<string>
#include<cstring>
#include<cmath>
#include<map>
#include<iostream>
#include<algorithm>
#define ll long long
const ll mod = 1e9+7;
using namespace std;
int a,b,c;
int main()
{
	while(~scanf("%d%d%d",&a,&b,&c)) {
		int flag = 0;
		for(int k = 1; k<=10000005; k++) {
			if((b*k+c) % a == 0) {
				printf("YES\n");flag = 1;break;
			}
		}
		if(!flag) printf("NO\n");
	}
	
	
	return 0 ;
}