Dante is engaged in a fight with "The Savior". Before he can fight it with his sword, he needs to break its shields. He has two guns, Ebony and Ivory, each of them is able to perform any non-negative number of shots.

For every bullet that hits the shield, Ebony deals a units of damage while Ivory deals b units of damage. In order to break the shield Dante has to deal exactly c units of damage. Find out if this is possible.


-----Input-----

The first line of the input contains three integers a, b, c (1 ≤ a, b ≤ 100, 1 ≤ c ≤ 10 000) — the number of units of damage dealt by Ebony gun and Ivory gun, and the total number of damage required to break the shield, respectively.


-----Output-----

Print "Yes" (without quotes) if Dante can deal exactly c damage to the shield and "No" (without quotes) otherwise.


-----Examples-----
Input
4 6 15

Output
No

Input
3 2 7

Output
Yes

Input
6 11 6

Output
Yes



-----Note-----

In the second sample, Dante can fire 1 bullet from Ebony and 2 from Ivory to deal exactly 1·3 + 2·2 = 7 damage. In the third sample, Dante can fire 1 bullet from ebony and no bullets from ivory to do 1·6 + 0·11 = 6 damage.

Difficulty: EASY
Tags: Number theory

Mathematics

Complete search
Skill types: Complete search

Starter code:

Solutions:
(a, b, c) = map(int, input().split())
for x in range(c // a + 1):
	if (c - a * x) % b == 0:
		print('Yes')
		break
else:
	print('No')


(a, b, c) = map(int, input().split())
ans = 'NO'
if c % a == 0 or c % b == 0:
	print('YES')
	quit()
for i in range(5000):
	for j in range(5000):
		if a * i + b * j == c:
			ans = 'YES'
			break
	if ans == 'YES':
		break
print(ans)


(a, b, c) = map(int, input().split())
for j in range(c // a + 1):
	if (c - j * a) % b == 0:
		print('YES')
		break
else:
	print('NO')


(a, b, c) = map(int, input().split())
i = 0
s = 'NO'
while i <= c:
	s = s if (c - i) % b else 'YES'
	i += a
print(s)


a = input().split()
b = int(a[0])
c = int(a[1])
d = int(a[2])
i = 0
j = 0
p = 0
for i in range(10000):
	for j in range(100):
		k = b * i + c * j
		if k == d:
			p = 1
			break
if p == 1:
	print('Yes')
else:
	print('No')


from math import floor
(a, b, c) = map(int, input().split())
x = 0
for i in range(floor(c / max(a, b)), -1, -1):
	if (c - i * max(a, b)) % min(a, b) == 0:
		x = 1
		break
if x:
	print('Yes')
else:
	print('No')


(a, b, c) = list(map(int, input().split()))
x1 = c // a + 1
f = False
for i in range(x1):
	j = (c - a * i) // b
	if a * i + b * j == c:
		f = True
if f:
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
p = [0] * 100000
p[0] = 1
p[a] = 1
p[b] = 1
for i in range(c + 1):
	if p[i]:
		p[i + a] = 1
		p[i + b] = 1
if p[c]:
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
for i in range(0, 10000):
	if i * a > c:
		break
	if (c - i * a) % b == 0:
		print('Yes')
		return
print('No')


def mod0(x, y, num):
	if num > 0:
		if num % x == 0 or num % y == 0 or num % (x + y) == 0:
			return 'Yes'
		else:
			return mod0(x, y, num - x - y)
	else:
		return 'No'
(x, y, num) = map(int, input().split())
print(mod0(x, y, num))


(a, b, c) = list(map(int, input().split(' ')))
for i in range(max(c // a, c // b) + 1):
	for j in range(max(c // a, c // b) + 1):
		if c == a * i + b * j:
			print('Yes')
			exit()
print('No')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = 1
	rr = []
	for _ in range(t):
		(a, b, c) = LI()
		ok = False
		for i in range(b):
			if i * a > c:
				break
			t = c - i * a
			if t % b == 0:
				ok = True
				break
		rr.append(Yes(ok))
	return JA(rr, '\n')
print(main())


from bisect import bisect_right as br
import sys
from collections import *
from math import *
import re

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	c = 0
	for i in range(2, n):
		if prime[i]:
			c += 1
	return c

def totient(n):
	(res, p) = (n, 2)
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			res -= int(res / p)
		p += 1
	if n > 1:
		res -= int(res / n)
	return res

def iseven(n):
	return [False, True][0 if n % 2 else 1]

def inp_arr():
	return list(map(int, input().split()))

def inp():
	return map(int, input().split())

def lcm(a, b):
	return a * b / gcd(a, b)
max_int = sys.maxsize
mod = 10 ** 9 + 7
flag = 0
(a, b, c) = inp()
for i in range(c // a + 1):
	y = (c - i * a) / b
	if y == int(y):
		flag = 1
		break
print(['NO', 'YES'][flag > 0])


(a, b, m) = map(int, input().split())
if a < b:
	(a, b) = (b, a)
for i in range((m + a) // a):
	if (m - a * i) % b == 0 or m - a * i == 0:
		print('Yes')
		exit(0)
print('No')


(a, b, c) = map(int, input().split())
la = []
lb = []
i = 0
while i <= c:
	la.append(i)
	i += a
i = 0
while i <= c:
	lb.append(i)
	i += b
z = []
if c in la or c in lb:
	print('Yes')
else:
	z = []
	for i in la:
		for j in lb:
			z.append(i + j)
	if c in z:
		print('Yes')
	else:
		print('No')


import sys
(a, b, c) = map(int, input().split())
for i in range(0, c + 1, a):
	if (c - i) % b == 0:
		print('Yes')
		sys.exit()
print('No')


def gcd_hell():
	print('hello')

def gcd(a, b):
	if b == 0:
		return a
	a %= b
	return gcd(b, a)
(a, b, c) = map(int, input().split())
y = 0
res = gcd(a, b)
if c > res:
	res = c % res + res
while (c - b * y) / a >= 0:
	if (c - b * y) % a == 0:
		print('Yes')
		break
	y += 1
else:
	print('No')


def main():
	(a, b, c) = map(int, input().split())
	if a == c or c % a == 0:
		print('Yes')
		return
	if b == c or c % b == 0:
		print('Yes')
		return
	if a > b:
		(a, b) = (b, a)
	if a > c:
		print('No')
		return
	for i in range(1, (c - a) // b + 1):
		for j in range(1, (c - b) // a + 1):
			if b * i + a * j > c:
				break
			if b * i + a * j == c:
				print('Yes')
				return
	print('No')
	return
main()


(a, b, c) = [int(i) for i in input().split()]
i = 0
flag = 0
while i * a <= c:
	if (c - i * a) % b == 0:
		flag = 1
		break
	else:
		i = i + 1
if flag > 0:
	print('Yes')
else:
	print('No')


import sys
from math import ceil
fast_reader = sys.stdin.readline
fast_writer = sys.stdout.write

def input():
	return fast_reader().strip()

def print(*argv):
	fast_writer(' '.join((str(i) for i in argv)))
	fast_writer('\n')
for _ in range(1):
	(a, b, c) = map(int, input().split())
	(a, b) = (min(a, b), max(a, b))
	maxa = ceil(c / a)
	maxb = ceil(c / b)
	if a == c or b == c:
		print('Yes')
		break
	f = False
	for i in range(maxa + 1):
		for j in range(maxb + 1):
			if a * i + b * j == c:
				print('Yes')
				f = True
				break
		if f:
			break
	if not f:
		print('No')


eis = list(map(int, input().split()))
ebony = eis[0]
ivory = eis[1]
shield = eis[2]
e = 0
while e <= shield:
	i = 0
	while i <= shield:
		if e + i == shield:
			print('Yes')
			exit()
		i += ivory
	e += ebony
print('No')


(a, b, c) = map(int, input().split())
ans = False
i = int(c / a)
while i >= 0:
	if (c - i * a) % b == 0:
		ans = True
		break
	i -= 1
if ans:
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
ans = 'No'
i = 0
while i * a <= c:
	if (c - i * a) % b == 0:
		ans = 'Yes'
	i = i + 1
i = 0
while i * b <= c:
	if (c - i * b) % a == 0:
		ans = 'Yes'
	i = i + 1
print(ans)


def d():
	(a, b, c) = map(int, input().split())
	if c < b and c < a:
		return 'No'
	if c % b == 0 or c % a == 0:
		return 'Yes'
	q = min(a, b)
	k = a + b - q
	while c > 0:
		c -= q
		if c % k == 0:
			return 'Yes'
	return 'No'
print(d())


def f(l):
	(a, b, c) = l
	if a < b:
		(a, b) = (b, a)
	aa = 0
	while aa <= c:
		if (c - aa) % b == 0:
			return True
		aa += a
	return False
l = list(map(int, input().split()))
print('Yes' if f(l) else 'No')


(a, b, c) = map(int, input().split())
count = 0
for i in range(c + 1):
	for j in range(c + 1):
		k = i * a + b * j
		if k == c:
			count += 1
			break
if count > 0:
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
if a > b:
	(a, b) = (b, a)
x = c // a
y = 0
while x * a + y * b != c:
	if x == 0:
		break
	x -= 1
	y = (c - x * a) // b
if x * a + y * b == c:
	print('Yes')
else:
	print('No')


m = list(map(int, input().split()))[:3]
while m[2] >= 0:
	if m[2] % m[0] == 0:
		print('Yes')
		break
	m[2] = m[2] - m[1]
if m[2] < 0:
	print('No')


(a, b, c) = map(int, input().split())
(b, a) = sorted([a, b])
ans = False
if c % 2 == 1 and a % 2 == 0 and (b % 2 == 0):
	pass
elif c == 0:
	ans = True
elif a == 0:
	pass
elif b == 0:
	if c % a == 0:
		ans = True
else:
	k = c // a
	for i in range(k, -1, -1):
		m = (c - i * a) % b
		if m == 0:
			ans = True
			break
if ans:
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
yes = 0
for i in range(0, c + 1, a):
	if (c - i) % b == 0:
		yes = 1
print(['No', 'Yes'][yes])


def solve(a, b, c):
	i = 0
	while i * a <= c:
		if (c - a * i) % b == 0:
			print('Yes')
			return
		i += 1
	print('No')
(a, b, c) = map(int, input().split())
solve(a, b, c)


def strelba(a, b, c):
	flag = 0
	for i in range(0, c + 1):
		z = c - a * i
		if z < 0:
			break
		elif z % b == 0:
			flag = 1
			break
	if flag:
		return 'YES'
	return 'NO'
(A, B, C) = [int(k) for k in input().split()]
print(strelba(A, B, C))


(a, b, c) = map(int, input().split())
x = False
while c > 0 and (not x):
	if c % b == 0:
		x = True
	c -= a
if x or c == 0:
	print('YES')
else:
	print('NO')


(a, b, c) = map(int, input().split(' '))
if c % a == 0 or c % b == 0:
	print('YES')
elif a == b:
	if c % a != 0:
		print('NO')
	else:
		print('YES')
else:
	if b > a:
		start = a
		end = b
	else:
		start = b
		end = a
	i = int(c / end)
	if (c - i * end) % start == 0:
		print('YES')
	else:
		flag = 0
		for j in range(i):
			if (c - j * end) % start == 0:
				flag = 1
				print('YES')
				break
		if flag == 0:
			print('NO')


def f(m, x, y):
	l = 0
	for n in range(m // x + 1):
		if (m - n * x) % y == 0:
			l = 1
			break
		else:
			l = 0
	return l
s = [int(n) for n in input().split()]
if s[2] % s[1] == 0:
	print('YES')
elif s[2] % s[0] == 0:
	print('YES')
elif f(s[2], s[0], s[1]) == 1:
	print('YES')
elif f(s[2], s[1], s[0]) == 1:
	print('YES')
else:
	print('NO')


(A, B, C) = [int(x) for x in input().split()]
for i in range(0, C + 1):
	if A * i > C:
		break
	if (C - A * i) % B == 0:
		print('Yes')
		return
print('No')


(a, b, c) = map(int, input().split())
x = 0
while x <= c:
	if (c - x) % b == 0:
		print('Yes')
		exit()
	x += a
print('No')


(a, b, c) = map(int, input().split())
for x in range(max(c // b, c // a) + 3):
	if -a * x + c >= 0 and (-a * x + c) % b == 0:
		print('Yes')
		break
else:
	print('No')


from math import gcd
(a, b, c) = map(int, input().split())
F = False
for i in range(10000 + 1):
	d = c - a * i
	if d >= 0 and d % b == 0:
		F = True
if F:
	print('Yes')
else:
	print('No')


(a, b, c) = list(map(int, input().split()))
(mymin, mymax) = (min(a, b), max(a, b))
if c % a == 0 or c % b == 0:
	print('Yes')
else:
	while c >= mymin:
		if c % mymin == 0:
			print('Yes')
			break
		else:
			c -= mymax
	else:
		print('No')


from sys import stdin
from math import gcd

def iinput():
	return int(stdin.readline())

def sinput():
	return input()

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
(a, b, c) = minput()
for i in range(c // a + 1):
	if (c - i * a) % b == 0:
		print('Yes')
		break
else:
	print('No')


x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
d = c // a + a
e = c // b + b
for ax in range(0, d):
	for bx in range(0, e):
		if a * ax + b * bx == c:
			print('Yes')
			quit()
print('No')


(a, b, c) = map(int, input().split())
for i in range(c // a + 2):
	for j in range(c // b + 2):
		if a * i + b * j == c:
			print('Yes')
			exit(0)
print('No')


import sys, math, io, os, time, itertools, collections
mod = 10 ** 9 + 7
sys.setrecursionlimit(10000)
i = sys.stdin.readline
p = sys.stdout.write
global start, end

def isin(l, x):
	left = 0
	right = len(l) - 1
	if x < l[0]:
		return -1
	while left <= right:
		mid = left + (right - left) // 2
		if l[mid] == x:
			return mid
		elif l[mid] < x:
			ans = mid
			left = mid + 1
		else:
			right = mid - 1
	return ans

def ispal(l):
	n = len(l)
	for i in range(n // 2 + 1):
		if l[i] != l[n - i - 1]:
			return False
	return True

def ccarray(l):
	d = {l[k]: k for k in range(len(l))}
	m = sorted(d)
	return [d[m[k]] for k in range(len(l))]

def is_prime(n):
	if n <= 3:
		return n > 1
	if n % 2 == 0 or n % 3 == 0:
		return False
	k = 5
	while k ** 2 <= n:
		if n % k == 0 or n % (k + 2) == 0:
			return False
		k += 6
	return True

def sieve(n):
	prime = [True for k in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for k in range(p * p, n + 1, p):
				prime[k] = False
		p += 1

def main():
	(a, b, c) = [int(k) for k in i().split()]
	s = min(a, b)
	l = max(a, b)
	for k in range(s):
		if c - k * l >= 0 and (c - k * l) % s == 0:
			p('Yes\n')
			break
	else:
		p('No\n')
t = 1
start = time.perf_counter()
for _ in range(t):
	main()
end = time.perf_counter()


def main():
	(a, b, c) = map(int, input().split())
	for x in range(0, 10 ** 5 + 1):
		if c - x * a < 0:
			break
		if (c - x * a) % b == 0:
			print('Yes')
			return
	print('No')
main()


import os
import math
import time
[a, b, c] = [int(x) for x in input().split(' ')]
dp = [False] * 10010
dp[0] = True
for i in range(10010):
	if dp[i]:
		if i + a < 10010:
			dp[i + a] = True
		if i + b < 10010:
			dp[i + b] = True
if dp[c]:
	print('Yes')
else:
	print('No')


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations

def Int():
	return int(sys.stdin.readline())

def Mint():
	return map(int, sys.stdin.readline().split())

def Lstr():
	return list(sys.stdin.readline().strip())

def Str():
	return sys.stdin.readline().strip()

def Mstr():
	return map(str, sys.stdin.readline().strip().split())

def List():
	return list(map(int, sys.stdin.readline().split()))

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def Prime_factors(n):
	i = 2
	factors = set()
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.add(i)
	if n > 1:
		factors.add(n)
	print(factors)
	if len(factors) == 2:
		return True
	else:
		return False

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def Sieve(n):
	prime = [True for i in range(n + 1)]
	lst = []
	p = 2
	while p * p <= n:
		if prime[p]:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p = p + 1
	for i in range(2, n + 1):
		if prime[i]:
			lst.append(i)
	return lst

def minimum_integer_not_in_list(a):
	b = max(a)
	if b < 1:
		return 1
	A = set(a)
	B = set(range(1, b + 1))
	D = B - A
	if len(D) == 0:
		return b + 1
	else:
		return min(D)

def solution():
	(a, b, c) = Mint()
	while c >= 0:
		if c % b == 0:
			print('Yes')
			exit(0)
		c = c - a
	else:
		print('No')
solution()


m = input().split()
(a, b, c) = [int(x) for x in m]
mas = [0] * (10001 + a + b)
mas[a] = 1
mas[b] = 1
i = min(a, b)
while i < c and mas[c] != 1:
	if mas[i] == 1:
		mas[i + a] = 1
		mas[i + b] = 1
		i += 1
	else:
		i += 1
if mas[c] == 1:
	print('Yes')
else:
	print('No')


import math as mt
import sys, string, bisect
input = sys.stdin.readline
from collections import deque
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
(a, b, c) = M()
for i in range(10000):
	if c - b * i < 0:
		break
	if (c - b * i) % a == 0:
		print('Yes')
		exit()
print('No')


(a, b, c) = (int(z) for z in input().split())

def f(a, b, c):
	x = 0
	ca = c // a
	res = 0
	while x <= ca:
		if (c - res) % b == 0:
			return 'Yes'
		else:
			res += a
			x += 1
	return 'No'
print(f(a, b, c))


(a, b, c) = map(int, input().split())
am = 0
bm = 0
ka = 0
kb = 0
if c % a == 0:
	print('YES')
elif c == 9995 or c == 9871:
	print('YES')
elif c % b == 0:
	print('YES')
elif a > c or b > c:
	print('NO')
else:
	while am * a < c:
		am += 1
	while bm * b < c:
		bm += 1
	for i in range(1, am):
		for j in range(1, bm):
			if i * a + j * b == c:
				ka += 1
	for i in range(1, bm):
		for j in range(1, am):
			if i * b + j * a == c:
				kb += 1
	if ka >= 1 or kb >= 1:
		print('YES')
	else:
		print('NO')


(a, b, c) = map(int, input().split())
r = 0
for i in range(100):
	if i * a > c:
		break
	if (c - a * i) % b < 1:
		r = 1
print('YNeos'[1 - r::2])


line = input().split()
k = int(line[2])
numbers = []
numbers.append(int(line[0]))
numbers.append(int(line[1]))
table = [False] * (k + 1)
for i in numbers:
	if i > k:
		continue
	table[i] = True
	for j in range(1, k):
		if table[j] and j + i <= k:
			table[j + i] = True
if table[k]:
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
for i in range(101):
	d = i * a
	if (c - d) % b == 0 and d <= c:
		print('Yes')
		exit(0)
print('No')


import math
(a, b, c) = map(int, input().split())
for i in range(0, c // a + 1):
	if (c - i * a) % b == 0:
		print('Yes')
		break
else:
	print('No')


from math import gcd
(a, b, c) = [int(p) for p in input().split()]
if c % gcd(a, b) == 0:
	for i in range(10000):
		if a * i > c:
			print('NO')
			exit()
		for j in range(10000):
			if a * i + b * j == c:
				print('YES')
				exit()
			if a * i + b * j > c:
				break
else:
	print('NO')


(a, b, c) = list(map(int, input().split()))
nums = []
for i in range(c + 1):
	if a * i == c:
		print('Yes')
		exit()
	elif a * i > c:
		break
	nums.append(a * i)
for i in range(1, c + 1):
	nums = [x + b for x in nums]
	if c in nums:
		print('Yes')
		exit()
print('No')


line = [int(x) for x in input().strip().split(' ')]
a = line[0]
b = line[1]
c = line[2]

def doable(a, b, c):
	for i in range(c // a + 1):
		t = c - i * a
		if t % b == 0:
			return True
	return False
if doable(a, b, c):
	print('Yes')
else:
	print('No')


a = [int(j) for j in input().split()]
s = ''
for k in range(a[1]):
	if (a[2] - k * a[0]) % a[1] == 0 and a[2] - a[0] * k >= 0:
		s = 'YES'
		break
if s == 'YES':
	print('YES')
else:
	print('NO')


import itertools, functools, math

def solve():
	(a, b, c) = map(int, input().split())
	i = 0
	while i * a <= c:
		damage_a = i * a
		damage_b = c - damage_a
		if damage_b == 0 or damage_b % b == 0:
			return 'Yes'
		i += 1
	return 'No'
print(solve())


from fractions import Fraction
from math import floor, ceil
(a, b, c) = map(int, input().split())
(a, b) = sorted([a, b], reverse=True)
stored = [a, b]
while b > 0:
	(a, b) = (b, a % b)
if c % a == 0:
	(a, b) = stored

	def egcd(a, b):
		if b == 0:
			return (a, 1, 0)
		nxt = egcd(b, a % b)
		return (nxt[0], nxt[2], nxt[1] - a // b * nxt[2])
	(d, x0, y0) = egcd(a, b)
	p = a // d
	q = b // d
	n = c // d
	X0 = n * x0
	Y0 = n * y0
	t_l = Fraction(-X0, q)
	t_r = Fraction(Y0, p)
	t_lf = floor(t_l)
	t_rf = floor(t_r)
	t_lc = ceil(t_l)
	t_rc = ceil(t_r)
	if t_rf - t_lf >= 1 or t_rc - t_lc >= 1:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(w, b, sh) = map(int, input().split())
fl = False
while not fl and sh > 0:
	if sh % b == 0 or sh % w == 0:
		fl = True
	sh -= w
if fl:
	print('Yes')
else:
	print('No')


import math
import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
(a, b, c) = invr()
if c % a == 0:
	print('Yes')
elif c % b == 0:
	print('Yes')
else:
	div = c // a
	curr = a
	fl = True
	for i in range(div):
		if (c - curr) % b == 0:
			print('Yes')
			fl = False
			break
		else:
			curr += a
	if fl:
		print('No')


from fractions import gcd
(a, b, c) = [int(x) for x in input().split()]
for i in range(0, c + 1, a):
	if (c - i) % b == 0:
		print('Yes')
		break
else:
	print('No')


(a, b, c) = map(int, input().split())
s = 0
if c % a == 0 or c % b == 0:
	print('Yes')
else:
	for k in range(1, 10001):
		h = 0
		for j in range(1, 10001):
			u = a * k + b * j
			if u == c:
				print('Yes')
				h += 1
				s += 1
				break
			elif u > c:
				break
		if s > 0:
			break
	if s == 0:
		print('No')


(a, b, c) = map(int, input().split())
test = False
limitA = c // a + 1
limitB = c // b + 1
for i in range(limitA, -1, -1):
	for j in range(limitB, -1, -1):
		if a * i + b * j == c and (not test):
			test = True
			break
	if a * i + b * j == c and test:
		break
if test:
	print('Yes')
else:
	print('No')


def equation1(a, b, c):
	for x in range(1, 9999):
		if c - b * x > 0 and (c - b * x) % a == 0:
			result = 'Yes'
			print(result)
			break
	else:
		result = 'No'
		print(result)

def solveyesorno(a, b, c):
	if c % (a + b) == 0:
		result = 'Yes'
		print(result)
	elif c % a == 0:
		result = 'Yes'
		print(result)
	elif c % b == 0:
		result = 'Yes'
		print(result)
	else:
		equation1(a, b, c)
(a, b, c) = [int(x) for x in input().split()]
solveyesorno(a, b, c)


n = [int(x) for x in input().split()]
a = n[0]
b = n[1]
c = n[2]
if a < b:
	aux = b
	b = a
	a = aux
rest = c % b
quot = c // b
ok = True
if c % a == 0 or c % b == 0:
	print('Yes')
	ok = False
else:
	for i in range((a - rest) // b, quot + 1):
		if (i * b + rest) % a == 0:
			print('Yes')
			ok = False
			break
if ok:
	print('No')


(a, b, c) = map(int, input().split())
p = 0
for i in range(0, 10001):
	if (c - a * i) % b == 0 and c - a * i > 0 or c - a * i == 0:
		print('Yes')
		exit()
print('No')


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

def a633(a, b, c):
	u = max(a, b)
	v = min(a, b)
	if u == c == 0:
		print('YES')
		return
	elif u == 0 and c > 0:
		print('NO')
		return
	else:
		for i in range(c // u + 1):
			if (c - i * u) % v == 0:
				print('YES')
				return
		print('NO')
a633(a, b, c)


(a, b, c) = map(int, input().split())
f = 0
for i in range(10001):
	n = c - i * a
	if n >= 0 and n // b == n / b:
		f = 1
		break
if f == 1:
	print('Yes')
else:
	print('No')


import sys
LI = lambda : list(map(int, sys.stdin.readline().split()))
MI = lambda : map(int, sys.stdin.readline().split())
SI = lambda : sys.stdin.readline().strip('\n')
II = lambda : int(sys.stdin.readline())
(a, b, c) = MI()
ok = False
for i in range(0, c, a):
	if (c - i) % b == 0:
		ok = True
for i in range(0, c, b):
	if (c - i) % a == 0:
		ok = True
print(['NO', 'YES'][ok])


import math
(a, b, c) = map(int, input().split())
if c % a == 0 or c % b == 0:
	print('Yes')
	quit()
ma = max(a, b)
mi = min(a, b)
if c < ma and c < mi:
	print('No')
	quit()
r = mi
flag = False
while r <= c:
	if (c - r) % ma == 0:
		flag = True
		break
	r += mi
if flag:
	print('Yes')
else:
	print('No')


def main():
	(a, b, c) = map(int, input().split())
	min_a = min(a, b)
	max_a = max(a, b)
	for i in range(c // min_a + 1):
		if (c - min_a * i) % max_a == 0:
			return 'Yes'
	return 'No'
print(main())


IL = lambda : list(map(int, input().split()))
IS = lambda : input().split()
I = lambda : int(input())
S = lambda : input()
(a, b, c) = IL()
ans = False
for i in range(0, c + 1, a):
	if (c - i) % b == 0:
		ans = True
print('Yes' if ans else 'No')


(x, y, z) = map(int, input().split())
for a in range(0, z + 1, x):
	for b in range(a, z + 1, y):
		if b == z:
			print('Yes')
			exit()
print('No')


readInts = lambda : list(map(int, input().split()))
(a, b, c) = readInts()
for i in range(c // a + 1):
	if (c - i * a) % b == 0:
		print('Yes')
		exit(0)
print('No')


(a, b, c) = map(int, input().split())
i = 0
k = c
while c - b * i >= 0:
	k = c - b * i
	if k % a == 0:
		print('Yes')
		exit()
	i += 1
print('No')


(a, b, c) = list(map(int, input().split()))
for i in range(10004):
	x = a * i
	if c - x >= 0:
		d = c - x
		if d % b == 0:
			print('Yes')
			exit()
print('No')
exit()


(a, b, c) = map(int, input().split())
ok = False
for i in range(c // a + 1):
	if c - a * i >= 0 and (c - a * i) % b == 0:
		ok = True
if ok:
	print('Yes')
else:
	print('No')


[a, b, c] = list(map(int, input().split()))
res = 'No'
for i in range(c // a + 1):
	if (c - i * a) % b == 0:
		res = 'Yes'
		break
print(res)


(a, b, c) = [int(x) for x in input().split(' ')]
x = c // b
possible = False
for i in range(0, x + 1):
	if (c - i * b) % a == 0:
		possible = True
		break
print('Yes' if possible else 'No')


def mina():
	(a, b, c) = map(int, input().split())
	k = 0
	while k * a <= c:
		if (c - k * a) % b == 0:
			print('Yes')
			return
		k += 1
	print('No')
mina()


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
while c > 0 and c > a and (c > b):
	if c % a == 0 or c % b == 0:
		break
	if a >= b:
		c -= a
	if b > a:
		c -= b
if c % a == 0 or c % b == 0:
	print('Yes')
else:
	print('No')


import math

def prime(n):
	ok = True
	for i in range(2, int(math.sqrt(n))):
		if n % i == 0:
			ok = False
			break
	if ok:
		return True
	else:
		return False

def fact(a, b):
	ans = 1
	for i in range(a, b + 1):
		ans *= i
	return str(ans) - 1

def comb(n, c):
	return fact(n) // (fact(n - c) * c)
(a, b, c) = map(int, input().split())
if c % 2 == 1 and (a % 2 != 1 and b % 2 != 1):
	print('No')
else:
	ok = False
	for i in range(10001):
		for s in range(10001):
			if a * i + b * s == c:
				ok = True
				break
		if ok:
			break
	if ok:
		print('Yes')
	else:
		print('No')


(a, b, c) = map(int, input().split())
sums = [1] + [0 for i in range(c)]
for var in (a, b):
	for i in range(c - var + 1):
		sums[i + var] += sums[i]
print('Yes') if sums[c] else print('No')


def main():
	(a, b, c) = map(int, input().split())
	for i in range(0, c + 1, a):
		rem = c - i
		if rem // b * b == rem:
			print('Yes')
			return
	print('No')
main()


(a, b, c) = map(int, input().split())
for i in range(20000):
	if (c - a * i) % b == 0 and c - a * i >= 0:
		print('Yes')
		quit()
print('No')


a = list(map(int, input().split()))
d = [0] * (a[2] + 1)
if a[0] <= a[2]:
	d[a[0]] = a[0]
if len(d) < a[1] and len(d) < a[0]:
	print('No')
	exit()
for i in range(1, a[2] + 1):
	if d[i] > 0:
		if d[i] + a[0] <= a[2]:
			d[i + a[0]] = d[i] + a[0]
if a[1] <= a[2]:
	d[a[1]] = a[1]
for i in range(1, a[2] + 1):
	if d[i] > 0:
		if d[i] + a[1] <= a[2]:
			d[i + a[1]] = d[i] + a[1]
print(('No', 'Yes')[d.count(a[2])])


(a, b, c) = map(int, input().split())
x = False
while c > 0 and (not x):
	if c % b == 0:
		x = True
	c -= a
if c == 0 or x:
	print('Yes')
else:
	print('No')


(a, b, c) = [int(x) for x in input().split()]
for i in range(0, 10005):
	A = c - a * i
	if A < 0:
		print('No')
		break
	elif A % b == 0:
		print('Yes')
		break


(a, b, c) = map(int, input().split())
i = 0
while i * a <= c:
	if not (c - i * a) % b:
		print('YES')
		exit()
	i += 1
print('NO')


import fractions
s = input().split(' ')
a = int(s[0])
b = int(s[1])
c = int(s[2])

def gcdex(a, b, x):
	if b == 0:
		x[0] = 1
		x[1] = 0
	else:
		gcdex(b, a % b, x)
		t = x[0]
		x[0] = x[1]
		x[1] = t - a // b * x[1]
if c % fractions.gcd(a, b) != 0:
	print('No')
else:
	k = fractions.gcd(a, b)
	a //= k
	b //= k
	x = [0, 1]
	gcdex(a, b, x)
	x[0] *= c // k
	x[1] *= c // k
	while x[0] < 0:
		x[0] += b
		x[1] -= a
	while x[1] < 0:
		x[0] -= b
		x[1] += a
	if x[0] < 0:
		print('No')
	else:
		print('Yes')


(a, b, c) = map(int, input().rstrip().split(' '))
r = 'NO'
for i in range(c // a + 1):
	if (c - a * i) % b == 0:
		r = 'YES'
		break
print(r)


(a, b, c) = list(map(int, input().split()))
num = c // a + 1
temp = 0
for i in range(num):
	if (c - i * a) % b == 0:
		temp = 1
		break
if temp == 1:
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
t = min(a, b)
for i in range(0, c // a + 1):
	y = (c - i * a) / b
	if y == int(y):
		print('Yes')
		exit()
print('No')


(a, b, c) = map(int, input().split())
if min(a, b) > c:
	exit(print('NO'))
for i in range(0, 10 ** 5 + 1):
	if c - i * a < 0:
		exit(print('NO'))
	if (c - i * a) % b == 0:
		exit(print('YES'))


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

def ans(a, b, c, d):
	if c % a == 0 or c % b == 0:
		print('Yes')
		return
	else:
		(a, b) = (min(a, b), max(a, b))
		while d < c:
			d += a
			if (c - d) % b == 0:
				print('Yes')
				return
			else:
				continue
		print('No')
		return
ans(a, b, c, d)


from math import ceil

def ExtendedEuclidean(a, b):
	if a == 0:
		return (b, 0, 1)
	(gcd, x_1, y_1) = ExtendedEuclidean(b % a, a)
	x = y_1 - b // a * x_1
	y = x_1
	return (gcd, x, y)

def is_plc(a, b, c):
	(gcd, x_0, y_0) = ExtendedEuclidean(a, b)
	if c % gcd != 0:
		return False
	(x_0, y_0) = (x_0 * (c // gcd), y_0 * (c // gcd))
	if x_0 >= 0 and y_0 >= 0:
		return True
	if x_0 < 0 and y_0 < 0:
		return False
	if x_0 < 0:
		k = ceil(-x_0 * gcd / b)
		(x_1, y_1) = (x_0 + k * b / gcd, y_0 - k * a / gcd)
	elif y_0 < 0:
		k = ceil(-y_0 * gcd / a)
		(x_1, y_1) = (x_0 - k * b / gcd, y_0 + k * a / gcd)
	if x_1 >= 0 and y_1 >= 0:
		return True
	else:
		return False
(a, b, c) = map(int, input().split())
if is_plc(a, b, c):
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
yes = False
x = 0
while a * x <= c:
	c2 = c
	c2 -= a * x
	y = c2 / b
	x += 1
	if y == int(y):
		yes = True
		break
print('Yes' if yes else 'No')


(a, b, c) = map(int, input().split())
key = 0
i = 0
while i * b <= c:
	if (c - i * b) % a == 0:
		key = 1
		break
	i += 1
if key == 0:
	print('No')
else:
	print('Yes')


(a, b, c) = map(int, input().split())
for i in range(0, 1000):
	x = c - i * a
	if x < 0:
		break
	if x % b == 0:
		print('YES')
		exit(0)
print('NO')


(a, b, c) = [int(j) for j in input().split()]
f = int(c / a)
output = 'NO'
for x in range(f + 1):
	val = c - x * a
	if val % b == 0:
		output = 'YES'
		break
print(output)


import math
(a1, b1, c) = map(int, input().split())
if c % math.gcd(a1, b1) != 0:
	print('No')
else:
	a = max(a1, b1)
	b = min(a1, b1)
	x = 0
	if c % a == 0:
		print('Yes')
	else:
		while a * x <= c:
			if (c - a * x) % b == 0:
				print('Yes')
				break
			x += 1
		else:
			print('No')


def Evony_And_Ivory(a, b, c):
	flat = 0
	for i in range(b):
		d = c - a * i
		if d < 0:
			flat = 0
			break
		if d % b == 0:
			flat = 1
			break
	if flat == 1:
		return 'Yes'
	else:
		return 'No'
(a, b, c) = [int(i) for i in input().split()]
print(Evony_And_Ivory(a, b, c))


(a, b, c) = map(int, input().split())
for i in range(c // a + 1):
	for j in range(c // b + 1):
		if i * a + j * b == c:
			print('Yes')
			exit(0)
		if i * a + j * b > 10000:
			break
print('No')


import sys
import fractions
(a, b, c) = map(int, input().split())
for i in range(0, c + 1):
	if c - a * i >= 0 and (c - a * i) % b == 0:
		print('YES')
		sys.exit()
print('NO')


(a, b, c) = map(int, input().split())
p = 0
while 1:
	k = c - p * a
	if k > 0 and (k % a == 0 or k % b == 0):
		print('Yes')
		break
	elif k < 0:
		print('No')
		break
	p += 1


def gcd(a, b):
	if b == 0:
		return (a, 1, 0)
	(g, x0, y0) = gcd(b, a % b)
	x = y0
	y = x0 - a // b * y0
	return (g, x, y)

def findanysolution(a, b, c):
	(g, x, y) = gcd(abs(a), abs(b))
	if c % g != 0:
		return False
	x *= c // g
	y *= c // g
	if a < 0:
		x = -x
	if b < 0:
		y = -y
	return (g, x, y)

def shift(x, y, a, b, cnt):
	x += cnt * b
	y -= cnt * a
	return (x, y)

def war(a, b, c, minx=0, miny=0):
	kk = findanysolution(a, b, c)
	if kk == False:
		return 'No'
	(g, x, y) = (kk[0], kk[1], kk[2])
	signa = a // abs(a)
	signb = b // abs(b)
	a //= g
	b //= g
	(x, y) = shift(x, y, a, b, (minx - x) // b)
	if x < minx:
		(x, y) = shift(x, y, a, b, signb)
	ly = y
	(x, y) = shift(x, y, a, b, -(miny - y) // a)
	if y < miny:
		(x, y) = shift(x, y, a, b, -signa)
	lx = x
	if lx < 0 and ly < 0:
		return 'No'
	return 'Yes'
(a, b, c) = map(int, input().split())
print(war(a, b, c))


from math import ceil

def gcdExt(a, b):
	if a < 0 or b < 0:
		return -1
	if b == 0:
		return (a, 1, 0)
	(g, x1, y1) = gcdExt(b, a % b)
	x = y1
	y = x1 - a // b * y1
	return (g, x, y)

def gcdNew(a, b):
	flag = 0
	if a < b:
		flag = 1
		(g, x, y) = gcdExt(b, a)
	else:
		(g, x, y) = gcdExt(a, b)
	if flag:
		(x, y) = (y, x)
	if a * x + b * y == g:
		return (g, x, y)
	else:
		return (g, -x, -y)
(a, b, c) = map(int, input().split())
if c % a == 0 or c % b == 0:
	print('Yes')
else:
	(g, x, y) = gcdNew(a, b)
	if c % g != 0:
		print('No')
	elif x >= 0 and y >= 0:
		print('Yes')
	else:
		m = c // g
		if x < 0:
			if m * y // (a // g) >= ceil(m * abs(x) / (b // g)):
				print('Yes')
			else:
				print('No')
		elif m * x // (b // g) >= ceil(m * abs(y) / (a // g)):
			print('Yes')
		else:
			print('No')


import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
(a, b, c) = invr()
res = 'No'
for i in range(c + 1):
	for j in range(c + 1):
		if a * i + b * j == c:
			res = 'Yes'
			break
print(res)


(a, b, c) = map(int, input().split())
f = False
for na in range(1 + c // a):
	if f:
		break
	for nb in range(1 + c // b):
		if a * na + b * nb == c:
			f = True
			break
if f:
	print('Yes')
else:
	print('No')


A = [0] * 100010
(a, b, c) = [int(x) for x in input().split()]
A[a] = A[b] = 1
for i in range(100000):
	if A[i] != 0:
		if i + a <= 100000:
			A[i + a] = 1
		if i + b <= 100000:
			A[i + b] = 1
if A[c] == 1:
	print('Yes')
else:
	print('No')


import sys
input = sys.stdin.readline
from math import ceil, floor, factorial

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
(a, b, c) = int_array()
f = 0
for i in range(10000):
	if f:
		break
	for j in range(10100):
		if a * i + b * j == c:
			f = 1
			break
		if a * i + b * j > c:
			break
if f:
	print('Yes')
else:
	print('No')


ln = [int(i) for i in input().split(' ')]
a = ln[0]
b = ln[1]
c = ln[2]
f = False
wds = ['No', 'Yes']
for i in range(0, c + a, a):
	for j in range(0, c + b, b):
		if i + j == c:
			f = True
print(wds[f])


(a, b, c) = map(int, input().split())
c1 = c
if min(a, b) > c:
	exit(print('NO'))
elif c % a == 0 or c % b == 0:
	exit(print('YES'))
while c1 > 0:
	if c1 % a == 0:
		exit(print('YES'))
	c1 -= b
c1 = c
while c1 > 0:
	if c1 % b == 0:
		exit(print('YES'))
	c1 -= a
print('NO')


(a, b, c) = map(int, input().split())
x = [0] * 10010
for i in range(a, len(x), a):
	x[i] = 1
for j in range(1, 10001):
	if j % b == 0:
		x[j] = 1
	if x[j] and j + b <= 10005:
		x[j + b] = 1
if x[c]:
	print('Yes')
else:
	print('No')


from sys import stdin
input = stdin.buffer.readline
(a, b, c) = map(int, input().split())
for i in range(10001):
	if c >= a * i and (not (c - a * i) % b):
		exit(print('Yes'))
print('No')


(a, b, c) = list(map(int, input().split()))
x = c
flag = 'No'
if c % a == 0 or c % b == 0:
	flag = 'Yes'
else:
	while x > 0:
		x = x - a
		if x % b == 0 and x > 0:
			flag = 'Yes'
			break
	if flag == 'No':
		x = c
		while x > 0:
			x = x - b
			if x % a == 0 and x > 0:
				flag = 'Yes'
				break
print(flag)


def main():
	(a, b, c) = map(int, input().split())
	for rest in range(c, -1, -a):
		if not rest % b:
			print('Yes')
			return
	print('No')
main()


(a, b, c) = list(map(int, input().split()))
ok = 0
for i in range(c + 1):
	val = c - a * i
	if val >= 0 and val % b == 0:
		ok = 1
ret = ['No', 'Yes']
print(ret[ok])


(a, b, c) = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
while c >= 0:
	if c % b == 0:
		print('yes')
		break
	c = c - a
if c < 0:
	print('no')


(a, b, c) = input().split()
(a, b, c) = (int(a), int(b), int(c))
c_left = c
while c_left >= 0:
	if c_left % b == 0:
		print('Yes')
		break
	c_left -= a
if c_left < 0:
	print('No')


(a, b, c) = map(int, input().split())
n = c // a
s = 'No'
for i in range(n + 1):
	if not (c - a * i) % b:
		s = 'Yes'
		break
print(s)


from math import gcd
(a, b, c) = map(int, input().split())
for x in range(c // a + 1):
	if (c - x * a) % b == 0:
		print('Yes')
		break
else:
	print('No')


n = list(map(int, input().split()))
if n[2] % n[0] == 0 or n[2] % n[1] == 0:
	print('Yes')
else:
	a = n[2] // n[0]
	b = n[2] // n[1]
	p = 0
	if a > b:
		for i in range(a + 1):
			for j in range(b, -1, -1):
				if i * n[0] + j * n[1] < n[2]:
					break
				elif i * n[0] + j * n[1] == n[2]:
					print('Yes')
					p = 1
					break
			if p == 1:
				break
	else:
		for i in range(b + 1):
			for j in range(a, -1, -1):
				if j * n[0] + i * n[1] < n[2]:
					break
				elif j * n[0] + i * n[1] == n[2]:
					print('Yes')
					p = 1
					break
			if p == 1:
				break
	if p != 1:
		print('No')


import collections
import math
(a, b, c) = list(map(int, input().split()))
for i in range(c // a + 1):
	if (c - a * i) % b == 0:
		print('Yes')
		return
print('No')


import fractions
(a, b, c) = [int(x) for x in input().split()]

def solve(a, b, c):
	if c % fractions.gcd(a, b) != 0:
		return False
	if c >= a * b:
		return True
	for i in range(b):
		for j in range(a):
			if a * i + b * j == c:
				return True
	return False
print('Yes' if solve(a, b, c) else 'No')


(a, b, c) = [int(x) for x in input().split()]
f = True
for i in range(c // a + 1):
	for j in range((c - i) // b + 1):
		if i * a + j * b == c:
			f = False
			break
	if not f:
		break
if not f:
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
if c % b == 0 or c % a == 0:
	print('Yes')
elif c < b and c < a:
	print('No')
elif c < b and c > a:
	if c % a == 0:
		print('Yes')
	else:
		print('No')
elif c > b and c < a:
	if c % b == 0:
		print('Yes')
	else:
		print('No')
else:
	mx = max(a, b)
	mn = min(a, b)
	ch = 0
	for i in range(1, c // mx + 1):
		if (c - mx * i) % mn == 0:
			ch = 1
			break
	if ch:
		print('Yes')
	else:
		print('No')


(a, b, c) = map(int, input().split())
for i in range(10000):
	if (c - i * a) % b == 0 and c - i * a >= 0:
		print('YES')
		exit()
print('NO')


from collections import defaultdict as di
import copy
import math
(a, b, c) = map(int, input().split())
x = math.gcd(a, b)
if c % x != 0:
	print('No')
else:
	i = 0
	f = 0
	while i * a <= c:
		if (c - a * i) % b == 0:
			print('Yes')
			f = 1
			break
		i += 1
	if f == 0:
		print('No')


(a, b, c) = map(int, input().split())
for i in range(c // a + (2 if c % a == 0 else 1)):
	for j in range((c - i * a) // b + (2 if (c - i * a) % b == 0 else 1)):
		if c - i * a - j * b == 0:
			print('Yes')
			quit()
print('No')


(a, b, c) = list(map(int, input().split()))
x = int(c / (a + b))
for i in range(x + 1):
	st = c - (a + b) * i
	if st % a == 0 or st % b == 0:
		print('Yes')
		exit(0)
print('No')


abc = list(map(int, input().split()))
(a, b, c) = (abc[0], abc[1], abc[2])
for i in range(c // a + 1):
	if (c - i * a) % b == 0 or c - i * a == 0:
		print('YES')
		exit()
print('NO')


(black, white, health) = map(int, input().split())
damage = [False] * (health + 1 + max(white, black))
damage[0] = True
for i in range(health):
	if damage[i]:
		damage[i + black] = True
		damage[i + white] = True
if damage[health]:
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
if c % a == 0 or c % b == 0:
	print('Yes')
	exit()
elif min(a, b) > c:
	print('No')
	exit()
while c > 0:
	c -= a
	if c < 0:
		break
	if c % b == 0:
		print('Yes')
		exit()
print('No')


(a, b, c) = map(int, input().split())
if c % a == 0 or c % b == 0:
	print('Yes')
	quit()
if c <= max(a, b):
	print('No')
	quit()
(c1, c2) = (c, c)
while c1 - a > 0:
	if (c1 - a) % b == 0:
		print('Yes')
		quit()
	else:
		c1 -= a
while c2 - b > 0:
	if (c2 - b) % a == 0:
		print('Yes')
		quit()
	else:
		c2 -= b
print('No')


(ebony, ivory, total) = map(int, input().split())
(possible, total2) = (False, total)
while total > 0 or total2 > 0:
	if total > 0:
		if total % ivory == 0:
			possible = True
			break
		else:
			total -= ebony
	if total2 > 0:
		if total2 % ebony == 0:
			possible = True
			break
		else:
			total2 -= ivory
if possible:
	print('Yes')
else:
	print('No')


(a, b, c) = [int(x) for x in input().split()]
if c < a and c < b:
	print('No')
elif c % a == 0:
	print('Yes')
elif c % b == 0:
	print('Yes')
else:
	found = False
	avalue = a
	while avalue < c and found == False:
		leftover = c - avalue
		if leftover % b == 0:
			found = True
			break
		else:
			avalue += a
	if found:
		print('Yes')
	else:
		print('No')


(a, b, c) = map(int, input().split())
for i in range(1, c // min(a, b) + 1):
	if (c - min(a, b) * i) % max(a, b) == 0 or c % a == 0 or c % b == 0:
		print('Yes')
		exit()
print('No')


(a, b, c) = map(int, input().split())
if c % a:
	while c > 0 and c % b:
		c -= a
	print('Yes' if c > 0 else 'No')
else:
	print('Yes')


def queue(q, x, y, z):
	i = 1
	while len(q) != 0:
		if x * i < z:
			q.append(x * i)
			i += 1
		elif x * i == z:
			print('Yes')
			exit()
		elif q[0] + y < z:
			q.append(q[0] + y)
			del q[0]
		elif q[0] + y == z:
			print('Yes')
			exit()
		else:
			del q[0]
(a, b, c) = map(int, input().split())
(queue_a, queue_b) = ([a], [b])
queue(queue_a, a, b, c)
queue(queue_b, b, a, c)
print('No')


abc = input().split(' ')
a = int(abc[0])
b = int(abc[1])
c = int(abc[2])
flag = False
for i in range(c // a + 1):
	for h in range(c // b + 1):
		n = i * a + h * b
		if n == c:
			flag = True
			break
	if flag:
		break
if flag:
	print('Yes')
else:
	print('No')


(a, b, c) = [int(i) for i in input().split()]
r = list(range(1, 10001))
k = 0
if c % a == 0 or c % b == 0:
	print('Yes')
else:
	for i in r:
		if (c - a * i) % b == 0 and c >= a * i:
			k = 1
			print('Yes')
			break
	if k == 0:
		print('No')


from math import gcd
(a, b, c) = input().split()
(a, b, c) = (int(a), int(b), int(c))
x = 0
while a * x <= c:
	y = c - a * x
	if y % b == 0:
		print('Yes')
		exit(0)
	else:
		x += 1
		continue
print('No')


from sys import stdin, stdout
(x, y, z) = map(int, stdin.readline().split())
for _ in range(int(z // x + 1)):
	if (z - _ * x) % y == 0:
		stdout.write('Yes\n')
		exit(0)
stdout.write('No\n')


def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
(a, b, c) = map(int, input().split())
g = gcd(a, b)
if c % g != 0:
	print('No')
else:
	a //= g
	b //= g
	c //= g
	for i in range(c // a + 1):
		done = False
		for j in range(c // b + 1):
			v = a * i + b * j
			if v == c:
				print('Yes')
				done = True
				break
			elif v > c:
				break
		if done:
			break
	else:
		print('No')


from math import ceil

def gcdEx(a, b, x, y):
	if not a:
		return (0, 1, b)
	(x1, y1, g) = gcdEx(b % a, a, 0, 0)
	x = y1 - b // a * x1
	y = x1
	return (x, y, g)
(a, b, c) = map(int, input().split())
(x, y, g) = gcdEx(a, b, 0, 0)
if c % g:
	print('No')
else:
	(x, y) = (x * c // g, y * c // g)
	k1 = ceil(-x * g / b)
	k2 = y * g // a
	c = abs(k2 - k1 + 1)
	print('Yes' if c > 0 else 'No')


__author__ = 'Utena'
(a, b, c) = map(int, map(int, input().split()))
while True:
	if c < 0:
		print('No')
		break
	elif c % a == 0 or c % b == 0:
		print('Yes')
		break
	c -= a


from math import gcd
(a, b, c) = list(map(int, input().split()))
flag = 0
for i in range(0, c + 1, a):
	if (c - i) % b == 0:
		print('YES')
		flag = 1
		break
if flag == 0:
	print('NO')


import sys

def ans(s):
	print(s)
	sys.exit()
(a, b, c) = map(int, input().split())
if c % a == 0:
	ans('Yes')
while c > 0:
	if c % b == 0:
		ans('Yes')
	c -= a
ans('No')


(a, b, c) = list(map(int, input().split()))
T = [not (c - a * k) % b for k in range(c // a + 1)]
if sum(T):
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
if a < b:
	(a, b) = (b, a)
r = a % b
need = c % b
curr = 0
curr_a = 0
while curr_a <= c and curr != need:
	curr += r
	curr %= b
	curr_a += a
if curr == need and curr_a <= c:
	print('Yes')
else:
	print('No')


__author__ = 'aste'

def main():
	(a, b, c) = [int(x) for x in input().split()]
	res = False
	for i in range(0, c + 1):
		r = c - a * i
		if r >= 0 and r % b == 0:
			res = True
			break
	print(res and 'Yes' or 'No')
main()


(a, b, c) = map(int, input().split())
x = 0
while a * x <= c:
	if (c - a * x) % b == 0:
		print('Yes')
		return
	x += 1
print('No')


def func():
	[a, b, c] = [int(el) for el in input().split()]
	if b > a:
		(a, b) = (b, a)
	while True:
		if c < a and c < b:
			return 'NO'
		if c % a == 0:
			return 'YES'
		if c % b == 0:
			return 'YES'
		c = c - b
	print('-')
print(func())


(a, b, c) = map(int, input().split(' '))
n = max(c // a, c // b)
f = 0
for i in range(n + 1):
	for j in range(n + 1):
		if i * a + j * b == c:
			f = 1
			break
	if f == 1:
		break
if f == 1:
	print('YES')
else:
	print('NO')


def shoot(a, b, c):
	if c % a == 0 or c % b == 0:
		print('YES')
		return
	while c >= a or c >= b:
		if c - a >= 0:
			c -= a
		if c % a == 0 or c % b == 0:
			print('YES')
			return
		if c - b >= 0:
			c -= b
		if c % a == 0 or c % b == 0:
			print('YES')
			return
	if c > 0:
		print('NO')
	else:
		print('YES')
(a, b, c) = [int(x) for x in input().split()]
shoot(min(a, b), max(a, b), c)


x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])

def swap(a, b):
	if a > b:
		tmp = a
		a = b
		b = tmp
if a > b:
	swap(a, b)
i = 0
ans = False
while a * i <= c and (not ans):
	if (c - a * i) % b == 0:
		ans = True
	i += 1
if ans == True:
	print('Yes')
else:
	print('No')


from math import *
from collections import Counter, defaultdict, deque
from sys import stdin, stdout
input = stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
(n, m, k) = M()
flag = 1
while k >= 0:
	if k % m == 0:
		print('YES')
		flag = 0
		break
	k -= n
if flag:
	print('No')


(a, b, c) = map(int, input().split())
d = False
r = c // min(a, b)
for i in range(r + 1):
	for j in range(r + 1):
		if i * a + j * b == c:
			d = True
			break
if d:
	print('YES')
else:
	print('NO')


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

def gcd(a, b):
	global x
	global y
	if b == 0:
		x = 1
		y = 0
		return a
	else:
		d = gcd(b, a % b)
		(x, y) = (y, x - y * (a // b))
		return d
x = 0
y = 0
g = gcd(a, b)
from math import ceil
if c % g == 0:
	x = x * (c // g)
	y = y * (c // g)
	if x < 0:
		k = ceil(abs(x) / (b // g))
		x = x + k * (b // g)
		y = y - k * (a // g)
	elif y < 0:
		k = ceil(abs(y) / (a // g))
		x = x - k * (b // g)
		y = y + k * (a // g)
	if x < 0 or y < 0:
		print('No')
	else:
		print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
flag = 0
for i in range(c // a + 2):
	t = c - a * i
	if t >= 0 and t % b == 0:
		flag = 1
		print('Yes')
		break
if flag == 0:
	print('No')


s = input()
(a, b, c) = s.split()
a = int(a)
b = int(b)
c = int(c)
check = False
for i in range(0, 10003):
	n = c - a * i
	if n >= 0 and n % b == 0:
		check = True
		print('Yes')
		break
if check == False:
	print('No')


(a, b, c) = map(int, input().split())
for x in range(0, 10001):
	y = (c - a * x) // b
	if a * x + b * y == c and y >= 0:
		exit(print('Yes'))
exit(print('No'))


(a, b, c) = map(int, input().split())
if c % a == 0 or c % b == 0 or c % (a + b) == 0:
	print('YES')
else:
	while c >= 0:
		if c % a == 0:
			print('YES')
			break
		c -= b
	else:
		print('NO')


(a, b, c) = list(map(int, input().split()))
poss = 'No'
for i in range(0, 10000):
	ebony = i * a
	ivory = c - ebony
	if ivory >= 0 and ivory % b == 0:
		poss = 'Yes'
print(poss)


(a, b, c) = map(int, input().split())
ase = list(range(0, 20000 * a, a))
bse = set(range(0, 20000 * b, b))
i = 0
k = 'No'
while c >= ase[i]:
	if c - ase[i] in bse:
		k = 'Yes'
		break
	i += 1
print(k)


(a, b, c) = tuple(map(int, input().split()))
if a == c:
	print('yes')
elif b == c:
	print('yes')
else:
	p1 = [x for x in range(c + 1) if x % a == 0]
	if c in p1:
		print('yes')
	else:
		p2 = [y for y in range(c + 1) if y % b == 0]
		if c in p2:
			print('yes')
		else:
			shot = (r + s for r in p1 for s in p2 if r + s <= c and r + s > c - a - b)
			if c in shot:
				print('yes')
			else:
				print('no')


abc = input().split()
a = int(abc[0])
b = int(abc[1])
c = int(abc[2])
count = 0
if c % a == 0 or c % b == 0:
	print('Yes')
else:
	for i in range(c):
		if i * a > c:
			break
		if (c - i * a) % b == 0:
			count += 1
	if count > 0:
		print('Yes')
	else:
		print('No')


data = input().split()
a = int(data[0])
b = int(data[1])
c = int(data[2])
m = min(a, b)
M = max(a, b)
if m == 0 and M != 0:
	if c % M == 0:
		print('Yes')
		win = True
	else:
		print('No')
		win = True
if M == 0 and m != 0:
	if c % m == 0:
		print('Yes')
		win = True
	else:
		print('No')
		win = True
if m == 0 and M == 0:
	if c == 0:
		print('Yes')
		win = True
	else:
		print('No')
		win = True
win = False
if m != 0 and M != 0:
	times = int(c / M)
	while times >= 0:
		if (c - M * times) % m == 0:
			print('Yes')
			win = True
			break
		times -= 1
if not win:
	print('No')


(a, b, c) = list(map(int, input().split(' ')))
x = int(c / a)
works = False
while x >= 0:
	ra = x * a
	if ra % c == 0 and ra != 0:
		works = True
		break
	aux = c - ra
	if aux >= b:
		mb = int(aux / b) * b
		r = ra + mb
		if r % c == 0:
			works = True
			break
	x = x - 1
if works:
	print('Yes')
else:
	print('No')


import math
(a, b, c) = [int(i) for i in input().split()]
x = 1
y = 0
x1 = 0
y1 = 1
a1 = a
b1 = b
while b1:
	q = a1 // b1
	(x, x1) = (x1, x - q * x1)
	(y, y1) = (y1, y - q * y1)
	(a1, b1) = (b1, a1 - q * b1)
if c % a1 != 0:
	print('No')
else:
	x = x * c // a1
	y = y * c // a1
	left1 = math.ceil(-a1 * x / b)
	right1 = math.floor(a1 * y / a)
	temp = right1 - left1
	if temp >= 0:
		print('Yes')
	else:
		print('No')


inp = input()
(a, b, c) = [int(i) for i in inp.split(' ')]
n = c // min(a, b) + 1
ch = False
for i in range(n + 1):
	for j in range(n + 1):
		if a * i + b * j == c:
			print('YES')
			ch = True
			break
	if ch:
		break
if not ch:
	print('NO')


import math

def gcd(xx, yy):
	(x, y) = sorted([xx, yy])
	while y != 0:
		r = x % y
		x = y
		y = r
	return x

def xgcd(aa, bb):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while aa != 0:
		(q, bb, aa) = (bb // aa, aa, bb % aa)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (bb, x0, y0)
(a, b, c) = [int(x) for x in input().split()]
(d, s, t) = xgcd(a, b)
if c % d == 0:
	if s >= 0 and t >= 0:
		print('Yes')
	else:
		q = c / d
		x0 = int(c * s / d)
		y0 = int(c * t / d)
		if math.floor(y0 * d / a) >= math.ceil(-x0 * d / b):
			print('Yes')
		else:
			print('No')
else:
	print('No')


from operator import itemgetter as ig
(a, b, k) = map(int, input().split(' '))
x = 0
while x <= k // a:
	if (k - x * a) % b == 0:
		print('Yes')
		break
	x += 1
else:
	print('No')


(a, b, c) = map(int, input().split())
min1 = min(a, b)
if c % a == 0 or c % b == 0:
	print('Yes')
	exit()
max1 = max(a, b)
while c > 0:
	c -= min1
	if c % max1 == 0:
		print('Yes')
		break
else:
	print('No')


from math import gcd
import sys
(a, b, c) = map(int, input().split())
if c % gcd(a, b) == 0:
	for i in range(0, 10001):
		for j in range(0, 10001):
			if a * i + b * j == c:
				print('Yes')
				sys.exit()
	print('No')
else:
	print('No')


str1 = input()
str = str1.split(' ')
x = int(max(str[0], str[1]))
y = int(min(str[0], str[1]))
z = int(str[2])
flag = 0
while z >= 0:
	if z % y == 0:
		flag = 1
		print('YES')
		break
	else:
		z -= x
if flag == 0:
	print('NO')


def extendedEuclid(a, b):
	global x, y, d
	if b == 0:
		x = 1
		y = 0
		d = a
		return
	extendedEuclid(b, a % b)
	x1 = y
	y1 = x - a // b * y
	x = x1
	y = y1

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
x = 0
y = 0
d = 0
(a, b, c) = map(int, input().split())
x = 0
y = 0
ret = False
while a * x + b * y <= c and (not ret):
	y = 0
	while a * x + b * y <= c and (not ret):
		if a * x + b * y == c:
			ret = True
		y += 1
	x += 1
	y = 0
if ret:
	print('Yes')
else:
	print('No')


(a, b, c) = (int(x) for x in input().split())
maxn = max(a, b)
minx = min(a, b)
if c % minx == 0:
	c = 0
while c >= maxn:
	c -= maxn
	if c % minx == 0:
		c = 0
		break
while c >= minx:
	c -= minx
if c != 0:
	print('NO')
else:
	print('YES')


(a, b, c) = list(map(int, input().split()))
while c >= 0:
	if c % b == 0:
		print('Yes')
		break
	c -= a
if c < 0:
	print('No')


(a, b, c) = map(int, input().split())
i = 0
while c - b * i >= 0:
	z = (c - b * i) % a
	i += 1
	if z == 0:
		break
print(['No', 'Yes'][z == 0])


(a, b, c) = map(int, input().split())
t = 0
while a * t <= c:
	if (c - a * t) % b == 0:
		print('Yes')
		exit()
	t += 1
print('No')


nums = list(map(int, input().split()))
e = nums[0]
i = nums[1]
dmg = nums[2]
passed = False
if dmg is e or dmg is i or dmg is 0:
	print('Yes')
else:
	index = 0
	while e * index < dmg and i * index < dmg:
		if (dmg - e * index) % i is 0:
			passed = True
			break
		elif (dmg - i * index) % e is 0:
			passed = True
			break
		index += 1
	if passed:
		print('Yes')
	else:
		print('No')


import math

def extendedeuclid(A, B):
	global x, y, d
	if B == 0:
		d = A
		x = 1
		y = 0
	else:
		extendedeuclid(B, A % B)
		temp = x
		x = y
		y = temp - A // B * y
x = 0
y = 0
d = 0
(a, b, c) = [int(x) for x in input().split()]
extendedeuclid(a, b)
if c % d:
	print('NO')
else:
	k = math.ceil(-(x * c // d) / (b / d))
	if y * (c // d) - k * (a / d) >= 0:
		print('YES')
	else:
		print('NO')


(a, b, c) = map(int, input().split())
if c % a == 0 or c % b == 0:
	print('Yes')
else:
	while c > 0:
		c -= max(a, b)
		if c % min(a, b) == 0 and c > 0:
			print('Yes')
			exit()
	print('Yes' if c == 0 else 'No')


from sys import stdin
(a, b, c) = map(int, stdin.readline().split())

def damage2():
	for y in range(0, int(c) + 1):
		x = int((c - b * y) / a)
		res = a * x + b * y
		if c == res and x >= 0:
			return 'Yes'
	return 'No'
print(damage2())


(a, b, c) = map(int, input().split())
flag = False
for i in range(0, 101):
	if (i * b - c) % a == 0:
		if i * b <= c:
			flag = True
			break
if flag:
	print('Yes')
else:
	print('No')


(a, b, c) = list(map(int, input().strip().split()))
from math import gcd

def egcd(a, b):
	if a == 0:
		return (b, (0, 1))
	else:
		(g, (x1, y1)) = egcd(b % a, a)
		x = y1 - b // a * x1
		y = x1
		return (g, (x, y))
if c % gcd(a, b) == 0:
	(g, (x, y)) = egcd(a, b)
	a //= g
	b //= g
	c //= g
	(g, (x, y)) = egcd(a, b)
	x *= c // g
	y *= c // g
	if x < 0:
		t = (-x + b - 1) // b
		x += t * b
		y -= t * a
	elif y < 0:
		t = (-y + a - 1) // a
		x -= t * b
		y += t * a
	if x >= 0 and y >= 0:
		assert x * a + y * b == c
		print('Yes')
	else:
		print('No')
else:
	print('No')


(n, m, o) = map(int, input().split())
for i in range(o // n + 1):
	if (o - i * n) % m == 0:
		print('Yes')
		break
else:
	print('No')


(a, b, c) = map(int, input().split())
h = 0
if c % a == 0:
	k = c // a
else:
	k = c // a + 1
if c % b == 0:
	m = c // b
else:
	m = c // b + 1
if c - a * k < 0 and c - b * m < 0 and (c < 2 * a and c < 2 * b):
	print('No')
else:
	for i in range(k + 1):
		if (c - a * i) % b == 0 and h == 0:
			print('Yes')
			h = 1
	if h == 0:
		print('No')


import math
ip = input().split(' ')
a = int(ip[0])
b = int(ip[1])
c = int(ip[2])

def gcd(a, b):
	if b == 0:
		return (a, 1, 0)
	(g, x, y) = gcd(b, a % b)
	return (g, y, x - y * int(a / b))
(g, x, y) = gcd(a, b)
if c % g:
	print('No')
	exit()
x *= c / g
y *= c / g
mink = math.ceil(-x * g / b)
maxk = math.floor(y * g / a)
if mink > maxk:
	print('No')
else:
	print('Yes')


def solve(a, b, c):
	for i in range(int(c / a) + 1):
		for j in range(int(c / b) + 1):
			if i * a + j * b == c:
				return True
	return False
(a, b, c) = map(int, input().split())
if solve(a, b, c):
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
for d1 in range(5002):
	for d2 in range(5002):
		if a * d1 + b * d2 == c:
			print('Yes')
			exit(0)
print('No')


def main():
	(a, b, c) = map(int, input().split())
	M = max(a, b)
	m = min(a, b)
	for i in range(0, c // M + 1):
		if (c - M * i) % m == 0:
			print('Yes')
			return
	print('No')
main()


(a, b, c) = [int(x) for x in input().split()]
d = c
if a % 2 == 0 and b % 2 == 0 and c & 1:
	print('No')
	quit()
while True:
	if c <= 0 and d <= 0:
		break
	if c > 0:
		if c % a == 0:
			print('Yes')
			quit()
		else:
			c -= b
	if d > 0:
		if d % b == 0:
			print('Yes')
			quit()
		else:
			d -= a
print('No')


import math
(a, b, n) = map(int, input().split())
g = math.gcd(a, b)

def gcdExtended(a, b):
	if a == 0:
		return (b, 0, 1)
	(gcd, x1, y1) = gcdExtended(b % a, a)
	x = y1 - b // a * x1
	y = x1
	return (gcd, x, y)
ans = 1
(g, p, q) = gcdExtended(a, b)
k1 = -(p * n) / b
k2 = q * n / a
if k2 < k1:
	ans = 0
ik1 = math.ceil(k1)
ik2 = math.ceil(k2)
dk1 = k1 - ik1
dk2 = k2 - ik2
if ik2 - ik1 >= 1:
	ans = 1
elif dk1 == 0.0 or dk2 == 0.0:
	ans = 1
else:
	ans = 0
if n % g != 0 or ans == 0:
	print('No')
else:
	print('Yes')


(x, y, z) = map(int, input().split())
for i in range(z // x + 1):
	if (z - i * x) % y == 0:
		print('YES')
		exit()
print('NO')


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
possible = False
for i in range(100000):
	if a * i > c:
		break
	x = (c - a * i) % b
	if x == 0:
		possible = True
		break
if possible:
	print('YES')
else:
	print('NO')


(ebony, ivory, total) = map(int, input().split())
savior = total
count = -1
while savior != 0:
	count += 1
	if savior == 0:
		print('YES')
		break
	elif savior % ebony == 0 or savior % ivory == 0:
		print('YES')
		break
	elif ivory > savior or ivory > savior:
		print('NO')
		break
	elif ebony <= savior:
		savior -= ebony
	elif ivory <= savior:
		savior -= ivory
	else:
		print('NO')
		break
if savior == 0:
	print('YES')


(a, b, c) = tuple(map(int, input().split(' ')))
for i in range(c // a + 1):
	if (c - i * a) % b == 0:
		print('YES')
		exit()
print('NO')


(a, b, c) = map(int, input().split())
(a, b) = (min(a, b), max(a, b))
i = 0
flag = 1
while i * a <= c:
	if (c - i * a) % b == 0:
		print('Yes')
		flag = 0
		break
	i += 1
if flag:
	print('No')


(a, b, c) = map(int, input().split())
x = 0
while x <= c:
	if (c - x) % b == 0:
		print('YES')
		exit()
	x += a
print('NO')


(a, b, c) = list(map(int, input().split()))
yes = False
for i in range(0, c + 1, a):
	if (c - i) % b == 0:
		yes = True
		break
print('Yes' if yes else 'No')


(n, m, c) = map(int, input().split())

def gcd(n, m):
	if m == 0:
		return n
	else:
		return gcd(m, n % m)
if c % gcd(n, m) == 0:
	f = 0
	x = c // n
	while x >= 0:
		if (c - x * n) % m == 0:
			f = 1
			break
		else:
			x -= 1
	if f == 1:
		print('Yes')
	else:
		print('No')
else:
	print('No')


from sys import argv, exit

def get_str():
	return input()

def get_int():
	return int(input())

def get_ints():
	return [int(i) for i in input().split(' ')]

def prnt(*args):
	if '-v' in argv:
		print(*args)
nums = get_ints()
eb = nums[0]
iv = nums[1]
shield = nums[2]
if shield % eb == 0 or shield % iv == 0:
	print('Yes')
	exit(0)
while shield > 0:
	if shield % iv == 0:
		print('Yes')
		exit(0)
	shield -= eb
print('No')


[a, b, c] = [int(x) for x in input().split()]
for i in range(c // a + 1):
	d = a * i
	if (c - d) % b == 0:
		print('Yes')
		exit(0)
print('No')


(a, b, n) = map(int, input().split())
ans = False
for i in range(n + 1):
	d1 = i
	d2 = n - i
	if d1 % a == 0 and d2 % b == 0:
		ans = True
print('Yes' if ans else 'No')


(a, b, c) = map(int, input().split())
help = False
for i in range(c + 1):
	if a * i > c:
		break
	if (c - a * i) % b == 0:
		print('Yes')
		help = True
		break
if not help:
	print('No')


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
if c % a == 0 or c % b == 0:
	print('Yes')
else:
	v = min(a, b)
	b = max(a, b)
	a = v
	inc = 1
	flag = 0
	val = a
	while val <= c:
		val = a * inc
		if (c - val) % b == 0:
			flag = 1
			break
		inc += 1
	print('Yes' if flag == 1 else 'No')


import math
(a, b, c) = str(input()).split()
a = int(a)
b = int(b)
c = int(c)
max_a = c // a + 1
max_b = c // b + 1
flag = False
base_a = 0
for it_a in range(max_a):
	base_b = 0
	for it_b in range(max_b):
		if base_a + base_b == c:
			flag = True
			break
		base_b += b
	if flag:
		break
	base_a += a
if flag:
	print('Yes')
else:
	print('No')


from math import ceil, floor

def gcd(a, b, ex=0):
	(x, y) = (1, 0)
	(x1, y1, a1, b1) = (0, 1, a, b)
	while b1:
		q = a1 // b1
		(x, x1) = (x1, x - q * x1)
		(y, y1) = (y1, y - q * y1)
		(a1, b1) = (b1, a1 - q * b1)
	if ex:
		return [a1, x, y]
	else:
		return a1
(a, b, c) = map(int, input().split())
(g, x, y) = gcd(a, b, 1)
if c % g != 0:
	print('No')
else:
	x = x * (c // g)
	y = y * (c // g)
	k = int(ceil(-x * g / b))
	if k <= y * g // a:
		print('Yes')
	else:
		print('No')