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