open System
open System.Collections.Generic
open System.Linq
open System

let Puts = Console.WriteLine : 'a -> unit
let Reads () = Console.ReadLine().Split()
let ReadDouble () = Reads() |> (fun x -> x.[0], x.[1])
let ReadTriple () = Reads() |> (fun x -> x.[0], x.[1], x.[2])
let ReadQuadruple () = Reads() |> (fun x -> x.[0], x.[1], x.[2], x.[3])

let FuncDouble f1 f2 (t1, t2) = (f1 t1, f2 t2)
let FuncTriple f1 f2 f3 (t1, t2, t3) = (f1 t1, f2 t2, f3 t3)
let FuncQuadruple f1 f2 f3 f4 (t1, t2, t3, t4) = (f1 t1, f2 t2, f3 t3, f4 t4)

let ReadIntTriple () = ReadTriple () |> FuncTriple int int int
let ReadIntDouble () = ReadDouble () |> FuncDouble int int

let ensmallen l = l % 1000000007L

let manhattan x y = abs (fst x - fst y) + abs (snd x - snd y)


let sayYESNO b = if b then Puts "YES" else Puts "NO"

// main code

let a, b, c = ReadIntTriple()

[1..100] |> Seq.map (fun i -> i * a % b) |> Seq.exists (fun i -> i = c) |> sayYESNO
