#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	int w=0;
	for(int i=0;i<100000;i++){
		if((i*b+c)%a==0){w=1;break;}
	}
	if(w)printf("YES\n");
	else printf("NO\n");
	return 0;
}