#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>

using namespace std;
int main() {
	int a, b, c;
	while (cin >> a >> b >> c) {
		int flag = 0;
		for (int k = 1; k <= 10000005; k++) {
			if ((b*k + c) % a == 0) {
				printf("YES\n"); 
				flag = 1; 
				break;
			}
		}
		if (!flag) 
			printf("NO\n");
	}

	system("pause");
	return 0;
}