import java.util.Scanner

object Main extends App{
  val sc = new Scanner(System.in)

  val a = sc.nextInt
  val b = sc.nextInt
  val c = sc.nextInt

  val res = if(c % gcd(a,b) == 0) "YES" else "NO"

  println(res)

  def gcd(a: Int, b: Int): Int ={
    (a,b) match{
      case (x,y) if y == 0 => x
      case (x,y) if x < y  => gcd(y, x)
      case (x,y)           => gcd(y, x % y)
    }
  }
}
