import std.stdio, std.string, std.array, std.conv, std.algorithm, std.typecons, std.range, std.container, std.math, std.algorithm.searching, std.functional,std.mathspecial, std.numeric;

void main(){
    auto abc=readln.split.map!(to!int).array;
    auto gcd=gcd(abc[0],abc[1]);
    writeln(abc[2]%gcd==0?"YES":"NO");
}
