# -*- coding: utf-8 -*-



# AtCoder Beginner Contest

# Problem B



if __name__ == '__main__':

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

    count = 1



    while count < 10001:

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

            print('YES')

            exit()



        count += 1



    print('NO')

# -*- coding: utf-8 -*-



# AtCoder Beginner Contest

# Problem B



if __name__ == '__main__':

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

    count = 1



    while count < (b + 1):

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

            print('YES')

            exit()



        count += 1



    print('NO')

# -*- coding: utf-8 -*-
# AtCoder Beginner Contest
# Problem B
if __name__ == "__main__":
    a, b, c = list(map(int, input().split()))
    count = 1
    while count < 10001:
        if ((a * count) % b) == c:
            print("YES")
            exit()
        count += 1
    print("NO")

# -*- coding: utf-8 -*-
# AtCoder Beginner Contest
# Problem B
if __name__ == "__main__":
    a, b, c = list(map(int, input().split()))
    count = 1
    while count < (b + 1):
        if ((a * count) % b) == c:
            print("YES")
            exit()
        count += 1
    print("NO")

-    while count < 10001: +    while count < (b + 1):