#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <stack>
using namespace std;
const int MaxN = 1000;

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