let rec gcd a b =
  if a mod b = 0 then b
  else gcd b (a mod b)

let ans a b c = if c mod (gcd a b) = 0 then "YES" else "NO"

let () = Scanf.scanf "%d %d %d" (fun a b c -> print_endline (ans a b c))
