We ask you to select some number of positive integers, and calculate the sum of them.
It is allowed to select as many integers as you like, and as large integers as you wish.
You have to follow these, however: each selected integer needs to be a multiple of A, and you need to select at least one integer.
Your objective is to make the sum congruent to C modulo B.
Determine whether this is possible.
If the objective is achievable, print YES. Otherwise, print NO.

-----Constraints-----
 - 1 ≤ A ≤ 100
 - 1 ≤ B ≤ 100
 - 0 ≤ C < B

-----Input-----
Input is given from Standard Input in the following format:
A B C

-----Output-----
Print YES or NO.

-----Sample Input-----
7 5 1

-----Sample Output-----
YES

For example, if you select 7 and 14, the sum 21 is congruent to 1 modulo 5.
[{"code": "a,b,c = map(int,input().split())\n\nmod = a % b\nans = 'NO'\nfor i in range(1,b):  \n  if (i*mod) % b == c:\n    ans = 'YES'\n    break\n  \nprint(ans)  ", "passed": true, "time": 0.15, "memory": 14224.0, "status": "done"}, {"code": "def answer(a: int, b: int, c: int) -> str:\n    for i in range(1, b + 1):\n        if a * i % b == c:\n            return 'YES'\n    return 'NO'\n\n\ndef main():\n    a, b, c = map(int, input().split())\n    print(answer(a, b, c))\n\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.15, "memory": 14132.0, "status": "done"}, {"code": "A,B,C=map(int,input().split())\nmod=set()\ntmp=0\nD=A\nwhile tmp not in mod:\n    mod.add(tmp)\n    tmp=D%B\n    if tmp==C:\n        print('YES')\n        return\n    D+=A\nprint('NO')", "passed": true, "time": 0.21, "memory": 14220.0, "status": "done"}, {"code": "A,B,C = map(int,input().split())\n\nif len([A for A in range(A,10000,A) if A%B==C]):\n  print('YES')\nelse:\n  print('NO')", "passed": true, "time": 0.14, "memory": 14112.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\ns = \"NO\"\nfor i in [a * j for j in range(1, b)]:\n    if i % b == c:\n        s = \"YES\"\n        break\n\nprint(s)", "passed": true, "time": 0.15, "memory": 14072.0, "status": "done"}, {"code": "A, B, C = map(int, input().split())\n\namari = []\n\nfor i in range(1, B+1):\n    amari.append(A*i%B)\n\nprint('YES' if C in amari else 'NO')", "passed": true, "time": 0.14, "memory": 14320.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\nres = \"NO\"\nfor i in range(1, b+1): #b\u3067\u5272\u308b=\u4f59\u308a\u304cb\u500b\u306e\u7a2e\u985e\u51fa\u308b\n    if (a*i)%b == c:\n        res = \"YES\"\n        break\nprint(res)", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "import sys\nA, B, C = list(map(int, input().split()))\n\nfor i in range(100):\n  if C == (A*i%B):\n    print(\"YES\")\n    return\nprint(\"NO\")\n", "passed": true, "time": 0.19, "memory": 14288.0, "status": "done"}, {"code": "a,b,c=map(int,input().split())\nfor i in range(a,b*a+1,a):\n  if i%b==c: print('YES');break\nelse:\n  print('NO')", "passed": true, "time": 0.15, "memory": 14184.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\nfor i in range(1, b+1): #b\u3067\u5272\u308b=\u4f59\u308a\u304cb\u500b\u306e\u7a2e\u985e\u51fa\u308b\n    if (a*i)%b == c:\n        print(\"YES\")\n        return\nprint(\"NO\")", "passed": true, "time": 0.2, "memory": 14108.0, "status": "done"}, {"code": "A,B,C=list(map(int,input().split()))\ns=0\nfor i in range(1,B+1):\n    x=A*i%B\n    if x==C:\n        s=s+1\n    else:\n        s=s\nif s!=0:\n    print('YES')\nelse:\n    print('NO')\n\n\n", "passed": true, "time": 0.23, "memory": 14076.0, "status": "done"}, {"code": "import math\nA,B,C = map(int, input().split())\n\nfor i in range(1, B+1):\n  if A*i%B == C:\n    print(\"YES\")\n    break\nelse:\n  print(\"NO\")", "passed": true, "time": 0.24, "memory": 14284.0, "status": "done"}, {"code": "a, b, c = list(map(int, input().split()))\ncount = 0\n#a\u306b\uff11\uff5eb\u306e\u6570\u3092\u304b\u3051\u305f\u30ea\u30b9\u30c8\nfor i in range(b + 1):\n    if ((i * a) % b) == c:\n      print(\"YES\")\n      count += 1\n      break\n    else:\n      pass\n\nif count == 0:\n  print(\"NO\")\nelse:\n  pass\n", "passed": true, "time": 0.16, "memory": 14280.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\nn = a\nans = 'NO'\nfor i in range(1, b + 1):\n    if n % b == c:\n        ans = 'YES'\n        break\n    else:\n        n += a\nprint(ans)", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "a,b,c = map(int,input().split())\ni = 0\nflag = True\nwhile flag:\n  num = b * i\n  if (num + c) % a == 0:\n    print(\"YES\")\n    flag = False\n  elif i >= 10**5:\n    print(\"NO\")\n    break\n  else:\n    i += 1", "passed": true, "time": 0.17, "memory": 14312.0, "status": "done"}, {"code": "a,b,c=map(int,input().split())\nd=a%b\nfor i in range(b):\n  if (d*i)%b==c:\n    print('YES')\n    return\nprint('NO')", "passed": true, "time": 0.21, "memory": 14212.0, "status": "done"}, {"code": "A, B, C = map(int,input().split())\n\nans = \"NO\"\n\nfor i in range(1,B+1):\n  if A*i%B == C:\n    ans = \"YES\"\n\nprint(ans)", "passed": true, "time": 1.64, "memory": 14276.0, "status": "done"}, {"code": "import sys\na,b,c=map(int,input().split())\ni=1\nl=[]\nwhile True:\n    aa=a*i%b\n    if aa in l:\n        break\n    l.append(aa)\n    i+=1\n    if aa!=0 and c%aa==0:\n        print('YES')\n        return\nprint('NO')", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "a,b,c = map(int, input().split())\n\nganma = a%b\nif ganma == 0:\n  if ganma == c:\n    print(\"YES\")\n  else:\n    print(\"NO\")\n\nelse:\n  mod_list = []\n  for i in range(b):\n    mod = (i*ganma)%b\n    mod_list.append(mod)\n\n  zero_one_list = []\n  for i in range(b):\n    if mod_list[i] == c:\n      zero_one_list.append(1)\n    else:\n      zero_one_list.append(0)\n    \n  sum_list = sum(zero_one_list)\n\n  if sum_list >= 1:\n    print(\"YES\")\n  else:\n    print(\"NO\")", "passed": true, "time": 0.2, "memory": 14128.0, "status": "done"}, {"code": "a, b, c = list(map(int, input().split()))\nfor i in range(1, b + 1):\n    if a * i % b == c:\n        print(\"YES\")\n        break\nelse:\n    print(\"NO\")\n", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\nhist = []\n\nans = 'NO'\nfor i in range(1, b+1):\n  mod = (a*i) % b\n  if mod == c:\n    ans = 'YES'\n    break\n  elif mod in hist:\n    break\n  hist.append(mod)\n    \nprint(ans)", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "a, b, c = list(map(int, input().split()))\nfor i in range(1, 2*b+1):\n    if i*a%b == c:\n        print('YES')\n        return\nprint('NO')\n", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "a,b,c = map(int, input().split())\n\nresult = \"NO\"\nfor i in range(1, b):\n    if a*i%b == c:\n        result = \"YES\"\n        break\n\nprint(result)", "passed": true, "time": 0.15, "memory": 14092.0, "status": "done"}, {"code": "a, b, c = list(map(int, input().split()))\nans = []\nfor i in range(1, b + 1):\n  ans.append((a * i) % b)\nprint((\"YES\" if c in ans else \"NO\"))\n", "passed": true, "time": 0.15, "memory": 14080.0, "status": "done"}, {"code": "import copy\na, b, c = map(int,input().split())\n\nx = copy.deepcopy(a)\nvisited = [False] * (b+1)\nflg = True\nwhile True:\n    x %= b\n    if x == c:\n        break\n    elif visited[x]:\n        flg = False\n        break\n    else:\n        visited[x] = True\n        x += a\nprint('YES') if flg else print('NO')", "passed": true, "time": 0.14, "memory": 14312.0, "status": "done"}, {"code": "import math\na,b,c = map(int, input().split())\nx = math.gcd(a , b)\nif c % x == 0:\n  print(\"YES\")\nelse:\n  print(\"NO\")", "passed": true, "time": 0.14, "memory": 14188.0, "status": "done"}, {"code": "#ABC060 B:Choose Integers\n\na,b,c = map(int, input().split())\nans = 'NO'\n\nfor i in range(b):\n    num = i * a\n    mod = num % b\n    if mod == c:\n        ans = 'YES'\n        break\nprint(ans)", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "A, B, C = map(int, input().split())\n\nans = \"NO\"\nfor i in range(1, 1000):\n    a = A*i\n    if a % B == C:\n        ans = \"YES\"\n        break\n        \nprint(ans)", "passed": true, "time": 0.14, "memory": 14276.0, "status": "done"}, {"code": "# -*- coding: utf-8 -*-\n\nA,B,C = map(int, input().split())\n\nans = \"NO\"\nfor i in range(B+1):\n    res = A * i % B\n    if res == C:\n        ans = \"YES\"\n        break\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\nd = []\nfor i in range(1, b + 1):\n    d.append((a * i) % b)\nif c in d:\n    print('YES')\nelse:\n    print('NO')", "passed": true, "time": 0.22, "memory": 14200.0, "status": "done"}, {"code": "A,B,C = map(int,input().split())\nfor i in range(B):\n  if (i+1)*A%B== C:\n    print('YES')\n    return\nprint('NO')", "passed": true, "time": 0.14, "memory": 14228.0, "status": "done"}, {"code": "def __starting_point():\n    a, b, c = map(int, input().split())\n\n    for i in range(1000000):\n        m = a * i % b\n        if m == c:\n            print('YES')\n            return\n    print('NO')\n__starting_point()", "passed": true, "time": 0.27, "memory": 14284.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\nfor i in range(1,b+1):\n    k = (a*i)%b\n    if k == c:\n        print(\"YES\")\n        return\nprint(\"NO\")", "passed": true, "time": 0.14, "memory": 14220.0, "status": "done"}, {"code": "import re\nimport copy\n\ndef accept_input():\n    a,b,c = list(map(int,input().split()))\n    return a,b,c\n\na,b,c = accept_input()\naamari = a%b\namaridict = {}\ncuramari = a%b\nfor i in range(b):\n    curamari = (curamari+aamari)%b\n    amaridict[curamari] = 1\nif c in amaridict:\n    print(\"YES\")\nelse:\n    print(\"NO\")\n", "passed": true, "time": 0.15, "memory": 14064.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\ncount = 1\nwhile a*count % b != 0:\n    count += 1\nfor i in range(count):\n    if a*i%b == c:\n        print(\"YES\")\n        return\nprint(\"NO\")", "passed": true, "time": 0.15, "memory": 14124.0, "status": "done"}, {"code": "a, b, c = map(int,input().split())\nA = []\nfor i in range(1,b+1):\n    mod = a*i % b\n    if mod in A:break\n    A.append(mod)\n\nA.sort()\nif len(A) >= 2:\n    i = A[1]\nelse:\n    i = 0\n\nif i == 0 and c == 0:\n    print('YES')\n    return\nelif i == 0 and c != 0:\n    print('NO')\n    return\n\nif c % i == 0:\n    print('YES')\nelse:\n    print('NO')", "passed": true, "time": 0.14, "memory": 14128.0, "status": "done"}, {"code": "A, B, C = map(int, input().split())\n\nfor i in range(100):\n  if ((C+B*i)/A).is_integer():\n    print('YES')\n    return\nprint('NO')", "passed": true, "time": 0.25, "memory": 14304.0, "status": "done"}, {"code": "import math\n\nA,B,C=list(map(int,input().split()))\nx=math.gcd(A,B)\n\nif C%x==0:\n    print(\"YES\")\nelse:\n    print(\"NO\")\n", "passed": true, "time": 0.22, "memory": 14092.0, "status": "done"}, {"code": "a,b,c=map(int,input().split())\nprint(\"YES\" if any((a*i)%b==c for i in range(1,b+1)) else \"NO\")", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "A, B, C = list(map(int, input().split()))\nclear = 0\n\nfor i in range(1, B):\n    if (A * i) % B == C:\n        clear = 1\n        break\n\nif clear == 0:\n    print('NO')\nelse:\n    print('YES')\n\n\n", "passed": true, "time": 0.24, "memory": 14328.0, "status": "done"}, {"code": "a,b,c = map(int, input().split())\nfor i in range(1,b):\n  if (a*i+c)%b == 0:\n    print(\"YES\")\n    break\nelse:\n  print(\"NO\")", "passed": true, "time": 0.23, "memory": 14184.0, "status": "done"}, {"code": "a, b, c = list(map(int, input().split()))\n\naa = a\ns = a % b\ndata = []\n\nwhile True:\n  aa += a\n  data.append(aa % b)\n  if aa % b == s:\n    break\n    \ndata.sort()\n\nif a % b == 0:\n  print(\"NO\")\nelif c % data[1] != 0:\n  print(\"NO\")\nelse:\n  print(\"YES\")\n", "passed": true, "time": 0.21, "memory": 14292.0, "status": "done"}, {"code": "a,b,c= map(int,input().split())\nfor i in range(1,b+1):\n    if i*a % b == c:\n        print('YES')\n        return\nprint('NO')", "passed": true, "time": 0.21, "memory": 14236.0, "status": "done"}, {"code": "from math import gcd\nnumbers = list(map(lambda x: int(x), input().split()))\na, b, c = numbers[0], numbers[1], numbers[2]\nprint('YES') if not c % gcd(a, b) else print('NO')\n", "passed": true, "time": 0.15, "memory": 14288.0, "status": "done"}, {"code": "a, b, c =map(int, input().split())\n\nans = \"NO\"\n\nfor i in range(1, b+1):\n    if a*i % b == c:\n        ans = \"YES\"\n        break\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "a,b,c = map(int, input().split())\n\nflag = True\n\nfor i in range(b):\n    if (a*(i+1))%b == c:\n        print(\"YES\")\n        flag = False\n        break\n    \nif flag:\n    print(\"NO\")", "passed": true, "time": 0.21, "memory": 14064.0, "status": "done"}, {"code": "A, B, C = list(map(int, input().split()))\n#kA%B\u306e\u6570\u5217\u306b\u306a\u308b\n#A\u3092B\u3067\u5272\u3063\u305f\u3042\u307e\u308a\u306fB-1\u4ee5\u4e0b\u306b\u306a\u308b\n#(k+B)A%B = (kA+BA)%B = kA%B + BA%B = kA%B\nfor i in range(1, B+1):\n    if A*i%B == C:\n        print('YES')\n        return\nprint('NO')\n", "passed": true, "time": 0.14, "memory": 14264.0, "status": "done"}, {"code": "a, b, c =map(int, input().split())\n\nans = \"NO\"\n\nfor i in range(1, b+1):\n    if a*i % b == c:\n        ans = \"YES\"\n        break\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "a,b,c = map(int,input().split())\nfor i in range(1,b+1):\n  if a*i%b == c:\n    print(\"YES\")\n    return\n  elif i == b:\n    print(\"NO\")", "passed": true, "time": 0.23, "memory": 14304.0, "status": "done"}, {"code": "A,B,C= map(int,input().split())\nA %= B\nfor i in range(1,B+1):\n  if A*i%B ==C:\n    print('YES')\n    return\nprint('NO')", "passed": true, "time": 0.14, "memory": 14208.0, "status": "done"}, {"code": "\nA,B,C = map(int,input().split())\ndp = [0]*1000\n\nans = 'NO'\ncur_A = A\nwhile 1:\n    if cur_A % B == C:\n        ans = 'YES'\n        break\n    elif dp[cur_A%B] == 1:\n        ans = 'NO'\n        break\n    dp[cur_A % B] = 1\n    cur_A += A\nprint(ans)", "passed": true, "time": 0.15, "memory": 14128.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\nans = 'NO'\nfor num in range(1, b + 1):\n    if (num * a) % b == c:\n        ans = 'YES'\n        break\n    else:\n        pass\nprint(ans)", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "a,b,c = [int(x) for x in input().split()]\n\ndef gcd(x,y):\n  while y != 0:\n    x, y = y, x % y\n  return x\n\nif c % gcd(a,b) == 0:\n  print(\"YES\")\nelse:\n  print(\"NO\")", "passed": true, "time": 0.14, "memory": 14164.0, "status": "done"}, {"code": "a,b,c = map(int,input().split())\nans = 'NO'\nfor i in range(1,b+1):\n  if (a*i)%b == c:\n    ans = 'YES'\nprint(ans)", "passed": true, "time": 0.14, "memory": 14080.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\n\nfor i in range(1, b+1):\n    if a*i % b == c:\n        print('YES')\n        return\n\nprint('NO')", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "A, B , C = map(int, input().split())\ndef gcd(a, b):\n\twhile b:\n\t\ta, b = b, a%b\n\treturn a\n\nif A==1:\n\tprint(\"YES\")\nelif C%gcd(A,B)==0:\n\tprint(\"YES\")\nelse:\n\tprint(\"NO\")", "passed": true, "time": 0.14, "memory": 14072.0, "status": "done"}, {"code": "A, B, C = map(int,input().split())\ndef answer():\n    for i in range(1, B+1):\n        if A * i % B == C:\n            return (\"YES\")\n    return (\"NO\")\n\nprint(answer())", "passed": true, "time": 0.15, "memory": 14256.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\nfor i in range(1, b + 1):\n        if a * i % b == c:\n                print(\"YES\")\n                return\n                \nprint(\"NO\")", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "a, b, c = list(map(int, input().split()))\nfor i in range(a, (a * b) + 1, a):\n    if i % b == c:\n        print(\"YES\")\n        return\nprint(\"NO\")\n", "passed": true, "time": 0.14, "memory": 14056.0, "status": "done"}, {"code": "from sys import stdin, stdout # only need for big input\n\ndef solve():\n    a, b, c = list(map(int, input().split())) \n    possible = False\n    for k in range(b):\n        if ( a * k - c ) % b == 0:\n            possible = True\n            break\n    if possible :\n        print(\"YES\")\n    else:\n        print(\"NO\")\n\ndef main():\n    solve()\n\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.14, "memory": 14092.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\ncnt = 0\nfor i in range(1, 10**5):\n    if (a*i)%b == c:\n        print(\"YES\")\n        break\n    else:\n        cnt += 1\n        if cnt == 10**5 - 1:\n            print(\"NO\")\n            break", "passed": true, "time": 0.16, "memory": 14192.0, "status": "done"}, {"code": "def zz():\n    return list(map(int,input().split()))\n\na,b,c = zz()\nans = 0\nfor i in range(1,b+1):\n   if (a*i)%b == c:\n       ans = 1\n       break\n\nif ans == 0:\n    print(\"NO\")\nelse:\n    print(\"YES\")\n", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\njudge=False\nfor i in range(b):\n    if a*i%b==c:\n        judge = True\n        break\n\nif judge:\n    print(\"YES\")\nelse:\n    print(\"NO\")", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "a,b,c=map(int,input().split())\nans=\"NO\"\nfor i in range(1,b+1):\n  if a*i%b==c:\n    ans=\"YES\"\n    break\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14288.0, "status": "done"}, {"code": "a,b,c=map(int, input().split())\nres=\"NO\"\nfor i in range(b):\n    if (a*i)%b==c:\n        res=\"YES\"\n        break   \nprint(res)", "passed": true, "time": 0.15, "memory": 14188.0, "status": "done"}, {"code": "ans = 'NO'\na, b, c = map(int, input().split())\nmemo = []\nfor i in range(1, 10**9):\n  tmp = (a * i)%b\n  if tmp == c:\n    ans = 'YES'\n    break\n  if tmp in memo:\n    break\n  else:\n    memo.append(tmp)\nprint(ans)", "passed": true, "time": 0.15, "memory": 14116.0, "status": "done"}, {"code": "a,b,c = map(int,input().split())\nbool = False\nfor i in range(1,101):\n    if a * i %  b == c:\n        bool = True\nif bool:\n    print('YES')\nelse:\n    print('NO')", "passed": true, "time": 0.14, "memory": 14140.0, "status": "done"}, {"code": "a,b,c=map(int,input().split())\nfor i in range(100):\n    if (b*i+c)%a==0:\n        print('YES')\n        return\nprint('NO')", "passed": true, "time": 0.14, "memory": 14172.0, "status": "done"}, {"code": "A,B,C = list(map(int,input().split()))\nR = C % B\n\nfound = False\nfor n in range(1,101):\n  if n*A % B == R:\n    found = True\n    break\n    \nif found:\n  print(\"YES\")\nelse:\n  print(\"NO\")\n", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "# -*- coding: utf-8 -*-\n\nA,B,C = map(int, input().split())\n\nmod = []\nfor i in range(max(B,C)):\n    res = A * i % B\n    if res == C:\n        ans = \"YES\"\n        break\n    if res in mod:\n        ans = \"NO\"\n        break\n    mod.append(res)\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\n\nn = a\ncnt = 1\nwhile cnt <= b:\n    if n % b == c:\n        print('YES')\n        return\n    cnt += 1\n    n += a\nprint('NO')", "passed": true, "time": 0.14, "memory": 14208.0, "status": "done"}, {"code": "a,b,c = map(int, input().split())\nres = 0\nfor i in range(1,101):\n    if (a*i) % b == c:\n        res += 1\n        \nprint(\"YES\") if res > 0 else print(\"NO\")", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "a,b,c = map(int,input().split())\nans = False\nfor i in range(b):\n    if a*i%b == c :\n        ans = True\n\nprint(\"YES\" if ans else \"NO\")", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "A, B, C = map(int, input().split())\nwhile B != 0:\n  A, B = B, A % B\nprint('YES' if C % A == 0 else 'NO')", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "a,b,c=list(map(int,input().split()))\n\nans=\"NO\"\nfor i in range(0,b+1):\n  for j in range(0,a+1):\n    if a*i == b*j+c:\n      ans=\"YES\"\n      break\n      \nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "lst = input().split()\n\nA = int(lst[0])\nB = int(lst[1])\nC = int(lst[2])\n\nL = []\n\nfor i in range(1, B+1):\n   L.append((A * i) % B)\n\nif C in L:\n   print('YES')\nelse:\n   print('NO')", "passed": true, "time": 0.23, "memory": 14248.0, "status": "done"}, {"code": "a, b, c = map(int,input().split())\nans = 'NO'\n\nfor i in range(1,b+1):\n    mod = a*i % b\n    if mod == 0:continue\n    elif c % mod == 0:\n        ans = 'YES'\n        break\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14080.0, "status": "done"}, {"code": "a,b,c = map(int,input().split())\nmodb = [0]*100\nfor i in range(1,100000):\n    n = a*i\n    m = n%b\n    # print(n,m)\n    if(modb[m] != 0):\n        break\n    modb[m] = 1\n\nprint(\"YES\" if(modb[c] == 1) else \"NO\")", "passed": true, "time": 0.14, "memory": 14344.0, "status": "done"}, {"code": "#9 B - Choose Integers AC(hint)\nA,B,C = map(int,input().split())\n\nresult = 'NO'\n\nnum = 0\n#(k+B)A%B = (kA + AB)%B = kB\nfor i in range(1,B+1):\n    num = (A*i)%B\n    if num == C:\n        result = 'YES'\n        break\nprint(result)    ", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\n\nfor i in range(b):\n    if (a * i) % b == c:\n        print('YES')\n        break\n    elif (a * i) % b == 0 and i > 0:\n        print('NO')\n        break", "passed": true, "time": 0.15, "memory": 14224.0, "status": "done"}, {"code": "import sys, math\nfrom itertools import combinations as c, product as p\nfrom collections import deque\nsys.setrecursionlimit(10**9)\nINF = float('inf')\nMOD = 10**9 + 7\n#MOD = 998244353\n\n\ndef si(): return input()\ndef ii(): return int(input())\ndef fi(): return float(input())\ndef lstr(): return input().split()\ndef lint(): return list(map(int, input().split()))\ndef lintdec(): return list(map(lambda x:int(x) - 1, input().split()))\ndef lnstr(n): return [input() for _ in range(n)]\ndef lnint(n): return [int(input()) for _ in range(n)]\ndef lint_list(n): return [lint() for _ in range(n)]\n\n\n\n############################################################\nA, B, C = lint()\n\nq = 0\nwhile q <= 100:\n    if (q * B + C) % A == 0:\n        print('YES')\n        break\n    q += 1\nelse:\n    print('NO')", "passed": true, "time": 0.14, "memory": 14380.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\n\nans='NO'\nfor i in range(1,b+1):\n    if a*i % b ==c:\n        ans='YES'\nprint(ans)", "passed": true, "time": 0.24, "memory": 14088.0, "status": "done"}, {"code": "a, b, c = map(int, input().split())\nprint(\"YES\" if any((a*i)%b==c for i in range(1, b+1)) else \"NO\")", "passed": true, "time": 0.22, "memory": 14316.0, "status": "done"}, {"code": "a,b,c= map(int,input().split())\nfor i in range(b):\n  if (a*i-c)%b ==0:\n    print(\"YES\")\n    return\nprint(\"NO\")", "passed": true, "time": 0.14, "memory": 14112.0, "status": "done"}, {"code": "a, b, c=map(int, input().split())\nd=a%b\ns=set()\nwhile d not in s:\n  s.add(d)\n  d=(d+a)%b\nif c in s:\n  print('YES')\nelse:\n  print('NO')", "passed": true, "time": 0.24, "memory": 14140.0, "status": "done"}, {"code": "A, B, C = list(map(int, input().split()))\ncalc = 0\n\nfor i in range(1000):\n    calc += A\n    rem = calc % B\n    if rem == C:\n        print('YES')\n        return\n\nprint('NO')\n", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "a,b,c = map(int,input().split())\n\nfor i in range(1,b):\n    if a*i%b == c:\n        print('YES')\n        break\nelse:\n    print('NO')", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "A, B, C=map(int, input().split(\" \"))\ncandidate=[(A*i)%B for i in range(1, B-1)]\n\nif C in candidate:\n  print('YES')\nelse:\n  print('NO')", "passed": true, "time": 0.14, "memory": 14312.0, "status": "done"}, {"code": "A, B, C=map(int, input().split(\" \"))\nmod=[]\npivot=1\nstep=1\n\nwhile True:\n  pivot = (step*A)%B\n  if (step*A)%B==C:\n    print('YES')\n    #print('debug', step)\n    break\n  elif pivot in mod:\n    print('NO')\n    break\n  else:\n    mod.append(pivot)\n    step=step+1", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "A, B, C = map(int, input().split())\n\nfor i in range(1, B+1):\n    if i*A % B == C:\n        print(\"YES\")\n        return\nprint(\"NO\")", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "A,B,C = map(int,input().split())\n\ncheck = False\nfor i in range(1, B+1):\n  if (A * i) % B == C:\n    check = True\n    \nprint(\"YES\" if check else \"NO\")", "passed": true, "time": 0.14, "memory": 14328.0, "status": "done"}, {"code": "a,b,c=input().split()\na=int(a)\nb=int(b)\nc=int(c)\nd=0\nfor i in range(1000):\n  if a*i%b==c:\n    d=d+1\nif d==0:\n  print(\"NO\")\nelse:\n  print(\"YES\")", "passed": true, "time": 0.14, "memory": 14164.0, "status": "done"}, {"code": "# ?\n# \u3069\u3046\u3084\u3063\u3066\u5168\u63a2\u7d22\u3059\u308b\u306e\u304b\u308f\u304b\u3089\u3093\na, b, c = map(int, input().split())\nfor i in range(1, 1000):\n    if (a * i) % b == c:\n        print(\"YES\")\n        return\nprint(\"NO\")", "passed": true, "time": 0.14, "memory": 14108.0, "status": "done"}]