#include<iostream>
using namespace std;
int main(){
	int n,a,b,s=0,g=0;
	cin>>n>>a>>b;
	while(1){
		s+=n;
		if(s%a==b){
			cout<<"YES";
			return 0;
		}
		g++;
		if(g>100) break;
	}
	cout<<"NO";
	return 0;
}