Imports System.Collections.Generic
Imports System.Console
Module Program
    Function f(A As Integer, B As Integer, C As Integer) As String
        For k As Integer = 0 to 10000000
            If (k * A) Mod B = C Then
                    Return "YES"
            End If
        Next k
        Return "NO"
    End Function
 	
 	Sub Main()
 	    Dim inputs as String()
        inputs = Console.ReadLine().Split(" ")
	    Dim A As Integer = inputs(0)
	    Dim B As Integer = inputs(1)
	    Dim C As Integer = inputs(2)
        Console.WriteLine(f(A,B,C))
    End Sub
End Module
