import sys

read = sys.stdin.read

from math import gcd

def main():

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

    gac = gcd(a, -b)

    if c % gac == 0:

        print('YES')

    else:

        print('NO')



if __name__ == '__main__':

    main()

import sys

read = sys.stdin.read

readlines = sys.stdin.readlines

def main():

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



    num = 2

    rem = a % b

    if rem == c:

        print('YES')

        sys.exit()

    while True:

        rem_t = (a * num) % b

        if rem_t == c:

            print('YES')

            sys.exit()

        elif rem_t == rem:

            print('NO')

            sys.exit()

        num += 1



if __name__ == '__main__':

    main()
import sys

read = sys.stdin.read
from math import gcd


def main():
    a, b, c = list(map(int, input().split()))
    gac = gcd(a, -b)
    if c % gac == 0:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

import sys

read = sys.stdin.read
readlines = sys.stdin.readlines


def main():
    a, b, c = list(map(int, input().split()))
    num = 2
    rem = a % b
    if rem == c:
        print("YES")
        sys.exit()
    while True:
        rem_t = (a * num) % b
        if rem_t == c:
            print("YES")
            sys.exit()
        elif rem_t == rem:
            print("NO")
            sys.exit()
        num += 1


if __name__ == "__main__":
    main()

-from math import gcd +readlines = sys.stdin.readlines -    gac = gcd(a, -b) -    if c % gac == 0: +    num = 2 +    rem = a % b +    if rem == c: -    else: -        print("NO") +        sys.exit() +    while True: +        rem_t = (a * num) % b +        if rem_t == c: +            print("YES") +            sys.exit() +        elif rem_t == rem: +            print("NO") +            sys.exit() +        num += 1