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

void main() {
  auto a = readln.split.to!(int[]);
  auto A = a[0], B = a[1], C = a[2];
  foreach (i; 0.. B) {
    if (A * (i+1) % B == C) {
      writeln("YES");
      return;
    }
  }
  writeln("NO");
}
