def resolve():

    a, b, c = list(map(int, input().split()))

    a %= b

    for i in range(b):

        if a*i %b == c:

            print("YES")

            exit()

    print("NO")

resolve()
def resolve():

    a,b,c = map(int, input().split())

    a %= b

    OK = False

    for i in range(b):

        if (a * i)%b == c:

            OK = True

    print("YES") if OK else print("NO")



resolve()

def resolve():
    a, b, c = list(map(int, input().split()))
    a %= b
    for i in range(b):
        if a * i % b == c:
            print("YES")
            exit()
    print("NO")


resolve()

def resolve():
    a, b, c = map(int, input().split())
    a %= b
    OK = False
    for i in range(b):
        if (a * i) % b == c:
            OK = True
    print("YES") if OK else print("NO")


resolve()

-    a, b, c = list(map(int, input().split())) +    a, b, c = map(int, input().split()) +    OK = False -        if a * i % b == c: -            print("YES") -            exit() -    print("NO") +        if (a * i) % b == c: +            OK = True +    print("YES") if OK else print("NO")