#include<cstdio> 
#include<cmath> 
#include<cstring> 
#include<algorithm> 
using namespace std; 

#define debug(x) cerr<#x<<"="<<x<<endl;
#define m(a,b) memset(a,b,sizeof(a))
typedef long long ll;

int main(){
	int a, b, c; 
	scanf("%d%d%d", &a, &b, &c); 
	for(int i = 1; i < 1000000; i++){
		if(((i * a) % b == c % b)){
			printf("YES\n"); 
			return 0; 
		} 
	} 
	printf("NO\n"); 
}