import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

void main() {
    auto abc = readints;
    int a = abc[0], b = abc[1], c = abc[2];

    bool found = false;
    for (int i = 1; i <= b; i++) {
        if (a * i % b == c) {
            found = true;
            break;
        }
    }
    writeln(found ? "YES" : "NO");
}
