You have $r$ red and $b$ blue beans. You'd like to distribute them among several (maybe, one) packets in such a way that each packet:

has at least one red bean (or the number of red beans $r_i \ge 1$);

has at least one blue bean (or the number of blue beans $b_i \ge 1$);

the number of red and blue beans should differ in no more than $d$ (or $|r_i - b_i| \le d$)

Can you distribute all beans?


-----Input-----

The first line contains the single integer $t$ ($1 \le t \le 1000$) — the number of test cases.

The first and only line of each test case contains three integers $r$, $b$, and $d$ ($1 \le r, b \le 10^9$; $0 \le d \le 10^9$) — the number of red and blue beans and the maximum absolute difference in each packet.


-----Output-----

For each test case, if you can distribute all beans, print YES. Otherwise, print NO.

You may print every letter in any case you want (so, for example, the strings yEs, yes, Yes and YES are all recognized as positive answer).


-----Examples-----

Input
4
1 1 0
2 7 3
6 1 4
5 4 0
Output
YES
YES
NO
NO


-----Note-----

In the first test case, you can form one packet with $1$ red and $1$ blue bean. The absolute difference $|1 - 1| = 0 \le d$.

In the second test case, you can form two packets: $1$ red and $4$ blue beans in the first packet and $1$ red and $3$ blue beans in the second one.

In the third test case, since $b = 1$, you can form only one packet with $6$ red and $1$ blue beans. The absolute difference $|6 - 1| = 5 > d$.

In the fourth test case, since $d = 0$ so each packet should contain the same number of red and blue beans, but $r \neq b$.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
def main():
	T = int(input())
	for _ in range(T):
		(R, B, D) = map(int, input().split())
		ok = solve(R, B, D)
		if ok:
			print('yes')
		else:
			print('no')

def solve(R, B, D):
	groupCnt = min(R, B)
	delta = abs(R - B)
	if not D:
		return not delta
	neededGroups = (delta + D - 1) // D
	return neededGroups <= groupCnt
main()


import math
for u in range(int(input())):
	s = list(map(int, input().split()))
	r = s[0]
	b = s[1]
	d = s[2]
	if math.ceil(abs(r - b) / (1.0 * min(r, b))) > d:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(r, b, d) = I()
	k = max(r, b)
	if d:
		k = (abs(r - b) + d - 1) // d
	if k <= min(r, b):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	if abs(x - y) > z * min(x, y):
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	(r, b, d) = list(map(int, input().split()))
	(r, b) = sorted([r, b])
	if r * (d + 1) >= b:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(r, b, d) = list(map(int, input().split()))
	amin = min(r, b)
	j = max(r, b)
	ans = amin * (d + 1)
	if ans >= j:
		print('Yes')
	else:
		print('No')


for k in range(int(input())):
	(t, b, d) = map(int, input().split())
	if max(t, b) <= min(t, b) * (d + 1):
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
import math
mod = 10 ** 9 + 7

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

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

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

def invr():
	return map(int, input().split())
for _ in range(inp()):
	(r, b, d) = invr()
	if r == b:
		print('YES')
		continue
	a = min(r, b)
	b = max(r, b)
	if a * (d + 1) >= b:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(r, b, d) = map(int, input().split())
	print('NO' if math.ceil(max(r, b) / min(r, b)) - 1 > d else 'YES')


t = int(input())
for i in range(t):
	list_input = list(map(int, input().split()))
	if max(list_input[:2]) - min(list_input[:2]) - min(list_input[:2]) * list_input[2] <= 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(r, b, d) = map(int, input().split())
	ans = (abs(r - b) + min(r, b) - 1) // min(r, b)
	if ans <= d:
		print('YES')
	else:
		print('NO')


import math
from collections import defaultdict as dfc
from collections import Counter
from math import gcd

def SOE(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
	l = []
	for p in range(2, n + 1):
		if prime[p]:
			l += [p]
	return l

def i1():
	return int(input())

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

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

def i4():
	return input()

def i5():
	return list(str(i1()))

def kbit(a, k):
	if a >> k - 1 and 1:
		return True
	else:
		return False
for i in range(i1()):
	(r, b, d) = i2()
	k1 = abs(r - b)
	if k1 == 0:
		print('YES')
	else:
		k2 = min(r, b)
		c = k1 // k2
		if k1 % k2 != 0:
			c = c + 1
		if c > d:
			print('NO')
		else:
			print('YES')


t = int(input())
for _ in range(t):
	(a, b, d) = map(int, input().split())
	c = max(a, b) / min(a, b)
	if int(c) != c:
		c = int(c)
		c += 1
	c -= 1
	if c <= d:
		print('YES')
	else:
		print('NO')


N = int(input())
for i in range(N):
	rbd = list(map(int, input().split()))
	(r, b, d) = (rbd[0], rbd[1], rbd[2])
	mind = min(r, b)
	maxd = max(r, b)
	if mind + mind * d >= maxd:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	(r, b, d) = [int(x) for x in input().split()]
	if r > b:
		(r, b) = (b, r)
	if (d + 1) * r < b:
		print('NO')
	else:
		print('YES')
	t = t - 1


t = int(input())
for _ in range(t):
	(r, b, d) = map(int, input().split())
	maxi = max(r, b)
	mini = min(r, b)
	maxi -= mini
	if maxi != 0:
		if maxi % mini == 0:
			d1 = maxi // mini
		else:
			d1 = maxi // mini + 1
		if d1 <= d:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(r, b, d) = map(int, input().split())
	if min(r, b) * (1 + d) >= max(r, b):
		print('YES')
	else:
		print('NO')


import math
for i in range(int(input())):
	(r, b, d) = map(int, input().split())
	n = abs(r - b)
	if math.ceil(n / min(r, b) <= d):
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(R, B, D) = [int(x) for x in input().split()]
		(R, B) = (min(R, B), max(R, B))
		B = -(-B // R)
		if B - 1 <= D:
			print('YES')
		else:
			print('NO')
main()


import math
num = int(input())
for i in range(num):
	arr = input()
	arr = arr.split(' ')
	r = int(arr[0])
	b = int(arr[1])
	d = int(arr[2])
	if int(max(r, b) / min(r, b)) <= d:
		print('YES')
	elif max(r, b) % min(r, b) == 0 and int(max(r, b) / min(r, b)) - 1 <= d:
		print('YES')
	elif math.ceil(max(r, b) / min(r, b)) - 1 <= d:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(r, b, d) = map(int, input().split())
	mi = min(r, b)
	ma = max(r, b)
	a = mi * (d + 1)
	if a >= ma:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(r, b, d) = map(int, input().split())
	if max(r, b) - min(r, b) <= min(r, b) * d:
		print('YES')
	else:
		print('NO')


case = int(input())
for i in range(case):
	(r, b, d) = map(int, input().split())
	if r <= b:
		if b > r * (d + 1):
			print('NO')
		else:
			print('YES')
	elif r > b * (d + 1):
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(a, b, d) = map(int, input().split())
	(x, diff) = (min(a, b), abs(a - b))
	if diff / x > d:
		print('NO')
	else:
		print('YES')


def beans(a, b, d):
	if d * min(a, b) >= abs(a - b):
		print('YES')
	else:
		print('NO')
t = int(input())
for j in range(t):
	arr = input().split(' ')
	for i in range(3):
		arr[i] = int(arr[i])
	beans(arr[0], arr[1], arr[2])


t = int(input())
for _ in range(t):
	(r, b, d) = map(int, input().split())
	bada = max(r, b) - min(r, b)
	temp = bada / min(r, b)
	if temp <= d:
		print('YES')
	else:
		print('NO')


import sys

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

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

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

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

def get_int():
	return int(sys.stdin.readline().strip())

def get_print_int(x):
	sys.stdout.write(str(x) + '\n')

def get_print(x):
	sys.stdout.write(x + '\n')

def get_print_int_same(x):
	sys.stdout.write(str(x) + ' ')

def get_print_same(x):
	sys.stdout.write(x + ' ')
from sys import maxsize
from math import ceil

def solve():
	for _ in range(get_int()):
		(r, b, d) = get_ints()
		if r <= b:
			minn = r
			rem = b - r
		else:
			minn = b
			rem = r - b
		upper = ceil(rem / minn)
		if abs(upper) <= d:
			get_print('YES')
		else:
			get_print('NO')
solve()


t = int(input())
for _ in range(t):
	(r, b, d) = map(int, input().split())
	if r == b:
		print('YES')
	elif r < b:
		if b <= (1 + d) * r:
			print('YES')
		else:
			print('NO')
	elif r > b:
		if r <= (1 + d) * b:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


import math

def solve():
	(r, b, d) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	if b > r * (d + 1):
		print('NO')
	else:
		print('YES')
for _ in range(int(input())):
	solve()


T = int(input())
for t in range(T):
	(r, b, d) = map(int, input().split())
	a = abs(r - b)
	pck = min(r, b)
	d1 = a // pck
	if a % pck != 0:
		d1 += 1
	if d1 > d:
		print('NO')
	else:
		print('YES')


for _ in range(0, int(input())):
	(r, b, d) = list(map(int, input().split()))
	diff = abs(r - b)
	mn = min(r, b)
	each = (diff + mn - 1) // mn
	if each <= d:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	arr = [int(_) for _ in input().split()]
	if abs(arr[1] - arr[0]) <= arr[2]:
		print('YES')
	elif min(arr[:2]) == 1:
		print('NO')
	elif abs(arr[0] - arr[1]) / min(arr[:2]) <= arr[2]:
		print('YES')
	else:
		print('NO')


t = int(input())
for tc in range(t):
	(r, b, d) = map(int, input().split())
	s = min(r, b)
	l = max(r, b)
	if (l - s) / s <= d:
		print('YES')
	else:
		print('NO')


for test in range(int(input())):
	(r, b, d) = map(int, input().split())
	(a, b) = (min(r, b), max(r, b))
	z = b // a
	if b % a:
		z += 1
	z -= 1
	if z <= d:
		print('YES')
	else:
		print('NO')


from sys import stdin, stderr
input = stdin.readline

def dbp(*args, **kwargs):
	print(*args, file=stderr, **kwargs)

def get_int_list():
	return [int(x) for x in input().strip().split()]

def do_thing():
	(r, b, d) = get_int_list()
	p = min(r, b)
	if p == 0:
		return 'NO'
	m = max(r, b)
	mm = p * d + p
	if m > mm:
		return 'NO'
	return 'YES'

def multicase():
	maxcc = int(input().strip())
	for cc in range(maxcc):
		print(do_thing())
multicase()


t = int(input())
ans = []
for i in range(t):
	nums = tuple(map(int, input().split()))
	mini = min(nums[:2])
	maxi = max(nums[:2])
	smallest = maxi // mini
	if maxi % mini != 0:
		smallest += 1
	if abs(smallest - 1) <= nums[-1]:
		ans.append('YES')
	else:
		ans.append('NO')
for case in tuple(ans):
	print(case)


from sys import maxsize, stdout, stdin, stderr
mod = int(1000000000.0 + 7)

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

def lint():
	return [int(x) for x in stdin.readline().split()]

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

def grid(r, c):
	return [lint() for i in range(r)]
from collections import defaultdict
import math
t = I()
for _ in range(t):
	(r, b, d) = lint()
	n = min(r, b)
	r -= n
	b -= n
	if max(r, b) - n * d > 0:
		print('NO')
	else:
		print('YES')


import sys, os, io
from sys import stdin, stdout
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import math
alphabets = list('abcdefghijklmnopqrstuvwxyz')

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

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 SieveOfEratosthenes(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

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def si():
	return input()

def prefix_sum(arr):
	r = [0] * (len(arr) + 1)
	for (i, el) in enumerate(arr):
		r[i + 1] = r[i] + el
	return r

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def ii():
	return int(input())

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

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')

def power_set(L):
	cardinality = len(L)
	n = 2 ** cardinality
	powerset = []
	for i in range(n):
		a = bin(i)[2:]
		subset = []
		for j in range(len(a)):
			if a[-j - 1] == '1':
				subset.append(L[j])
		powerset.append(subset)
	powerset_orderred = []
	for k in range(cardinality + 1):
		for w in powerset:
			if len(w) == k:
				powerset_orderred.append(w)
	return powerset_orderred

def fastPlrintNextLines(a):
	print('\n'.join(map(str, a)))

def sortByFirstAndSecond(A):
	A = sorted(A, key=lambda x: x[0])
	A = sorted(A, key=lambda x: x[1])
	return list(A)
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a < b:
		if b > a * (c + 1):
			print('NO')
		else:
			print('YES')
	elif a > b * (c + 1):
		print('NO')
	else:
		print('YES')


for _ in [*open(0)][1:]:
	(r, b, d) = map(int, _.split())
	if b >= r:
		print(['NO', 'YES'][d >= (b - 1) // r])
	else:
		print(['NO', 'YES'][d >= (r - 1) // b])


for _ in range(int(input())):
	(red, blue, diff) = [int(x) for x in input().split()]
	if abs(red - blue) <= diff * min(red, blue):
		print('yes')
	else:
		print('no')


for i in range(int(input())):
	(r, b, d) = map(int, input().split())
	if b > r:
		(r, b) = (b, r)
	if r // b - int(r // b == r / b) <= d:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(r, b, d) = map(int, input().split())
	m = max(r, b)
	n = min(r, b)
	if (d + 1) * n >= m:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(r, b, d) = map(int, input().split())
	mi = min(r, b)
	ma = max(r, b)
	if ma / mi - 1 > d:
		print('nO')
	else:
		print('yEs')


def rbb(r, b, d):
	x = min([r, b])
	y = max([r, b])
	f = y / x
	if int(f) != f:
		f = int(f) + 1
	if f <= d + 1:
		print('YES')
	else:
		print('NO')
for i in range(int(input())):
	(r, b, d) = map(int, input().split())
	rbb(r, b, d)


t = int(input())
for i in range(t):
	(r, b, d) = map(int, input().split())
	output = 'NO'
	diff = abs(r - b)
	minBean = min(r, b)
	if int((diff + minBean - 1) / minBean) <= d:
		output = 'YES'
	print(output)


t = int(input())
for i in range(t):
	(r, b, d) = map(int, input().split())
	a = abs(r - b)
	ab = d * min(r, b)
	if ab >= a:
		print('YES')
	else:
		print('NO')


import sys
input = iter(sys.stdin.read().splitlines()).__next__

def solve():
	(r, b, d) = map(int, input().split())
	if r > b:
		(r, b) = (b, r)
	if b > r * (d + 1):
		return 'NO'
	return 'YES'
t = int(input())
output = []
for _ in range(t):
	output.append(solve())
print(*output, sep='\n')


t = int(input())
for it in range(t):
	(r, b, d) = [int(tmp) for tmp in input().split()]
	p = min(r, b)
	if abs(r - b) > d * p:
		print('NO')
	else:
		print('YES')


from sys import stdin
from math import ceil
for test in range(int(input())):
	(r, b, d) = map(int, input().split())
	x = min(r, b)
	(r, b) = (r - x, b - x)
	if ceil((r + b) / x) <= d:
		print('YES')
	else:
		print('NO')


n = int(input())
lst = []
for i in range(n):
	(r, b, d) = input().split(' ')
	x = max(int(r), int(b)) - min(int(r), int(b))
	div = x // min(int(r), int(b))
	res = x % min(int(r), int(b))
	if res == 0:
		if div <= int(d):
			lst.append('YES')
		else:
			lst.append('NO')
	elif div + 1 <= int(d):
		lst.append('YES')
	else:
		lst.append('NO')
for i in range(n):
	print(lst[i])


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	r = min(a, b)
	t = r * (1 + c)
	if max(a, b) <= t:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(R, B, D) = input().split()
	r = int(R)
	b = int(B)
	d = int(D)
	if abs(1 - (r + b - 1) // min([r, b])) <= d:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(r, b, d) = [int(x) for x in input().split()]
	k = min(r, b)
	if k == r and r * (d + 1) >= b:
		print('yes')
	elif k == b and b * (d + 1) >= r:
		print('Yes')
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import *
from collections import defaultdict
getcontext().prec = 25
MOD = pow(10, 9) + 7
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	l = list(map(int, input().split(' ')))
	(a, b) = sorted(l[:2])
	x = math.ceil(b / a)
	x -= 1
	if x > l[2]:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(a, b, k) = map(int, input().split())
	print('YES' if abs(a - b) <= min(a, b) * k else 'NO')


t = int(input())
for j in range(1, t + 1):
	(r, b, d) = map(int, input().split())
	if r > b:
		a = r
		r = b
		b = a
	if b > r * (d + 1):
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	bean = list(map(int, input().split()))
	if 0 in bean[:2]:
		print('NO')
		continue
	n = min(bean[:2])
	m = max(bean[:2])
	if abs((m - n) / n) <= bean[2]:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
get_string = lambda : stdin.readline().strip('\n')
get_intmap = lambda : map(int, get_string().split(' '))

def testcase():
	(r, b, d) = get_intmap()
	(n, m) = (min(r, b), max(r, b))
	print(['NO', 'YES'][m <= n * (1 + d)])
t = int(input())
for _ in range(t):
	testcase()


for _ in range(int(input())):
	(r, b, d) = map(int, input().split())
	(z, y) = (min(r, b), max(r, b))
	diff = y - z
	zz = diff // z + (diff % z != 0)
	if d < zz:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(r, b, d) = map(int, input().split())
	if d * min(r, b) >= abs(r - b):
		print('Yes')
	else:
		print('No')


import math
from sys import stdin, stdout
from operator import itemgetter
t = int(input())
for i in range(t):
	(n, m, d) = map(int, stdin.readline().split())
	flag = 0
	if d == 0:
		if n != m:
			flag = 1
	else:
		mi = min(n, m)
		k = mi * (d + 1)
		if max(m, n) > k:
			flag = 1
	if flag == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	(r, b, d) = map(int, input().split())
	(r1, b1) = (r, b)
	r /= min(r1, b1)
	b /= min(r1, b1)
	if abs(r - b) > d:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	x = input()
	r = int(x.split()[0])
	b = int(x.split()[1])
	d = int(x.split()[2])
	a1 = max(r, b)
	a2 = min(r, b)
	if a1 > a2 * (d + 1):
		print('NO')
	else:
		print('YES')


t = int(input())
while t > 0:
	(a, b, c) = list(map(int, input().split()))
	if abs(a - b) / min(a, b) <= c:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())
for test in range(t):
	(r, b, d) = map(int, input().split())
	cha = abs(r - b)
	max_n = max(r, b)
	min_n = min(r, b)
	if cha / min_n > d:
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	t -= 1
	(r, b, d) = map(int, input().split())
	if abs(r - b) / min(r, b) > d:
		print('NO')
	else:
		print('YES')


import math
t = int(input())
while t:
	t -= 1
	(r, b, d) = map(int, input().split())
	M = math.ceil(max(r, b) / min(r, b))
	if M - 1 <= d:
		print('YES')
	else:
		print('NO')


import math
import sys
import collections
import bisect
import time
import random
from itertools import permutations

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

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

def get_string():
	return sys.stdin.readline().strip()
for t in range(int(input())):
	(r, b, d) = get_ints()
	if d == 0:
		if r == b:
			print('YES')
		else:
			print('NO')
		continue
	if r == b:
		print('YES')
		continue
	m = math.ceil(abs(r - b) / d)
	if r // m >= 1 and b // m >= 1:
		print('YES')
	else:
		print('NO')
	continue


from sys import stdin, stdout
for testcase in range(int(stdin.readline())):
	(r, b, d) = list(map(int, stdin.readline().split()))
	if d == 0:
		print(['NO', 'YES'][r == b])
	else:
		print(['NO', 'YES'][abs(r - b) / d <= min(r, b)])


t = int(input())
for i in range(t):
	(a, b, c) = [int(x) for x in input().split()]
	if max(a, b) % min(a, b) == 0:
		if max(a, b) // min(a, b) > c + 1:
			print('NO')
		else:
			print('YES')
	elif max(a, b) // min(a, b) > c:
		print('NO')
	else:
		print('YES')


n = int(input().strip())
FullList = []
for _ in range(n):
	List = list(map(int, input().split()))
	FullList.append(List)
for general in FullList:
	Max = max(general[:2])
	Min = min(general[:2])
	result = Max / Min - 1
	if abs(result) <= general[2]:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(r, b, d) = map(int, input().split())
	if r > b:
		mx = r
		mn = b
	else:
		mx = b
		mn = r
	if (mx - 1) // mn > d:
		print('NO')
	else:
		print('YES')


import math
t = int(input())
while t:
	t -= 1
	(r, b, d) = list(map(int, input().strip().split()))
	ratio = math.ceil(max(r, b) / min(r, b)) - 1
	if ratio <= d:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	m = min(a, b)
	m1 = max(a, b)
	if c == 0:
		if a == b:
			print('YES')
		else:
			print('NO')
	elif (c + 1) * m >= m1:
		print('YES')
	else:
		print('NO')


n = int(input())
arr = []
for i in range(0, n):
	(a, b, c) = [int(x) for x in input().split()]
	if a > b:
		if a - b > b * c:
			arr.append('NO')
		else:
			arr.append('YES')
	elif b - a > a * c:
		arr.append('NO')
	else:
		arr.append('YES')
for j in range(0, n):
	print(arr[j])


import sys
from os import path
FILE = False
if FILE:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

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

def get_line():
	return list(map(int, sys.stdin.readline().strip().split()))
n = get_int()
final_result = []
for i in range(n):
	line = get_line()
	r = line[0]
	b = line[1]
	d = line[2]
	if r > b:
		big = r
		small = b
	else:
		big = b
		small = r
	if big % small == 0:
		diff = big / small - 1
	else:
		diff = int(big / small)
	if diff <= d:
		final_result.append('YES')
	else:
		final_result.append('NO')
for item in final_result:
	sys.stdout.write(item)
	sys.stdout.write('\n')


for _ in range(int(input())):
	l = list(map(int, input().split()))[:3]
	if abs(l[0] - l[1]) / min(l[0], l[1]) <= l[2]:
		print('YES')
	else:
		print('NO')


from math import ceil
for _ in range(int(input())):
	(b, r, d) = [int(i) for i in input().split()]
	if ceil(abs(b - r) / min(b, r) > d):
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(a, b, c) = [int(i) for i in input().split()]
	if a > b:
		(a, b) = (b, a)
	one = 1 + c
	many = one * a
	if many >= b:
		print('yes')
	else:
		print('no')


n = int(input())
tlist = []
for i in range(n):
	s = input().split(' ')
	r = int(s[0])
	b = int(s[1])
	d = int(s[2])
	mi = min(r, b)
	ma = max(r, b)
	if mi + mi * d < ma:
		tlist.append('NO')
	elif mi + mi * d >= ma:
		tlist.append('YES')
for _ in tlist:
	print(_)


t = int(input())
for _ in range(t):
	(r, b, d) = list(map(int, input().split()))
	differ = abs(r - b)
	mn = min(r, b)
	each = (differ + mn - 1) // mn
	if each <= d:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	A = input().split(' ')
	r = int(A[0])
	b = int(A[1])
	d = int(A[2])
	ma = max(r, b)
	mi = min(r, b)
	print(('YES', 'NO')[(ma - mi) / mi > d])


t1 = int(input())
for hi in range(t1):
	(r, b, d) = map(int, input().split())
	p = abs(r - b)
	l = p / min(r, b)
	if l <= d:
		print('YES')
	else:
		print('NO')


for _ in ' ' * int(input()):
	(r, b, d) = list(map(int, input().split()))
	print(['NO', 'YES'][abs(r - b) <= d * min(r, b)])


import sys
input = sys.stdin.readline
for i in range(int(input())):
	(r, b, d) = map(int, input().split())
	if (1 + d) * min(r, b) >= max(r, b):
		print('YES')
	else:
		print('NO')


for g in [*open(0)][1:]:
	(a, b, d) = map(int, g.split())
	print('YNEOS'[abs(a - b) > min(a, b) * d::2])


x = int(input())
for i in range(x):
	(a, b, d) = map(int, input().split())
	n = min(a, b)
	m = max(a, b)
	c = n * (d + 1)
	if m <= c:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(r, b, d) = map(int, input().split())
	print(min(r, b) * (d + 1) >= max(r, b) and 'YES' or 'NO')


from itertools import product
import itertools
import sys
import heapq
from collections import deque
MOD = 1000000000007

def find(parent, i):
	if parent[i] != i:
		parent[i] = find(parent, parent[i])
	return parent[i]

def union(parent, rank, xx, yy):
	x = find(parent, xx)
	y = find(parent, yy)
	if rank[x] > rank[y]:
		parent[y] = x
	elif rank[y] > rank[x]:
		parent[x] = y
	else:
		parent[y] = x
		rank[x] += 1
ans = 0
K = int(sys.stdin.readline().strip())
x = 0
y = 0
for _ in range(K):
	ans = []
	e = []
	o = []
	F = True
	(r, b, d) = list(map(int, sys.stdin.readline().strip().split()))
	if r == b:
		print('YES')
	elif r > b:
		if r <= (1 + d) * b:
			print('YES')
		else:
			print('NO')
	elif b <= (1 + d) * r:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(r, b, d) = list(map(int, input().split()))
	p = min(r, b)
	t = abs(r - b)
	if p * d >= t:
		print('YES')
	else:
		print('NO')


n = int(input())

def panduan(case):
	a = case[0]
	b = case[1]
	diff = case[2]
	if diff == 0:
		if a == b:
			print('YES')
		else:
			print('NO')
	else:
		c = max(a, b)
		d = min(a, b)
		if c <= d * (diff + 1):
			print('YES')
		else:
			print('NO')
for i in range(n):
	testcase = [int(_) for _ in input().split()]
	panduan(testcase)


import math

def name(r, b, d):
	if r == b:
		return 'YES'
	if r > b:
		if math.ceil(r / (1 + d)) <= b:
			return 'YES'
	elif math.ceil(b / (1 + d)) <= r:
		return 'YES'
	return 'NO'
n = int(input().strip())
for i in range(n):
	(r, b, d) = list(map(int, input().strip().split()))
	print(name(r, b, d))


def divisible(red, blue, diff):
	least = red if red <= blue else blue
	if abs(red - blue) / least <= diff:
		return True
	else:
		return False
for t in range(int(input())):
	(r, b, d) = map(int, input().split())
	if divisible(r, b, d):
		print('YES')
	else:
		print('NO')


tests = int(input())
for _ in range(tests):
	(r, b, d) = list(map(int, input().split()))
	(r, b) = (max(r, b), min(r, b))
	if d == 0:
		print('YES' if r == b else 'NO')
	elif b == 1:
		print('YES' if r - b <= d else 'NO')
	else:
		x = (r - b) // b + (1 if r % b else 0)
		print('YES' if x <= d else 'NO')


t = int(input())
for i in range(t):
	(r, b, d) = list(map(int, input().split()))
	if r > b:
		if r / b - 1 <= d:
			print('Yes')
		else:
			print('No')
	elif b / r - 1 <= d:
		print('Yes')
	else:
		print('No')


from math import ceil
t = int(input())
for T in range(t):
	(r, b, d) = [int(x) for x in input().split()]
	(mn, mx) = (min(r, b), max(r, b))
	diff = mx - mn
	if d == 0:
		if r == b:
			print('YES')
		else:
			print('NO')
		continue
	num_packets = ceil(diff / d)
	if mn >= num_packets:
		print('YES')
	else:
		print('NO')


for i in ' ' * int(input()):
	(a, b, d) = map(int, input().split())
	print('YES' if (d + 1) * min(a, b) >= max(a, b) else 'NO')


n = int(input())
m = []
for i in range(n):
	abc = input().split()
	a = int(abc[0])
	b = int(abc[1])
	c = int(abc[2])
	thisMin = a
	thisMax = b
	if b < thisMin:
		thisMin = b
		thisMax = a
	if thisMin * (1 + c) >= thisMax:
		m.append('YES')
	else:
		m.append('NO')
for i in range(n):
	print(m[i])


t = int(input())
for i in range(t):
	(n, m, a) = map(int, input().split())
	a1 = abs(n - m)
	mn = min(n, m)
	if a1 / mn <= a:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	(r, b, d) = map(int, input().split())
	k = min(r, b)
	if k * (d + 1) >= max(r, b):
		print('YES')
		continue
	print('NO')


from sys import stdin
input = stdin.readline
from heapq import heapify, heappush, heappop, heappushpop
from collections import defaultdict as dd, deque as dq, Counter as C
from math import factorial as f, ceil, gcd, sqrt, log
from bisect import bisect_left as bl, bisect_right as br
from itertools import combinations as c, permutations as p
from math import factorial as f, ceil, gcd, sqrt, log
mi = lambda : map(int, input().split())
ii = lambda : int(input())
li = lambda : list(map(int, input().split()))
mati = lambda r: [li() for _ in range(r)]
lcm = lambda a, b: a * b // gcd(a, b)

def solve():
	(r, b, d) = mi()
	(r, b) = (min(r, b), max(r, b))
	if r * (d + 1) >= b:
		print('YES')
	else:
		print('NO')
for _ in range(ii()):
	solve()


for s in [*open(0)][1:]:
	(*a, d) = map(int, s.split())
	(r, b) = sorted(a)
	print('YNEOS'[b - r > d * r::2])


for _ in range(int(input())):
	(r, b, d) = [int(x) for x in input().split()]
	if abs(r - b) <= d * min(r, b):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(r, b, d) = input().split()
	r = int(r)
	b = int(b)
	d = int(d)
	Min = min(r, b)
	Max = max(r, b)
	if Max / Min - d <= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(r, b, d) = [int(i) for i in input().strip().split()]
	check = True
	if d == 0:
		if r != b:
			print('NO')
			check = False
	else:
		max_packets = min(r, b)
		if r + b - max_packets > (d + 1) * max_packets:
			print('NO')
			check = False
	if check:
		print('YES')


import math
t = int(input())
while t > 1000 or t < 1:
	t = int(input())
answer = []
while t > 0:
	ls = list(map(int, input().split()))
	r = ls[0]
	b = ls[1]
	d = ls[2]
	if r < 1 or b < 1:
		continue
	if r >= b:
		an = math.ceil(r / b)
		k = an - 1
		if k <= d:
			answer.append('yes')
		else:
			answer.append('no')
	elif b > r:
		an = math.ceil(b / r)
		k = an - 1
		if k <= d:
			answer.append('yes')
		else:
			answer.append('no')
	t -= 1
for i in answer:
	print(i)


t = int(input())
l = []
for i in range(t):
	(r, b, d) = list(map(int, input().split()))
	if abs(r - b) <= min(r, b) * d:
		print('yes')
	else:
		print('no')


for i in range(int(input())):
	(a, b, c) = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	x = min(a, b)
	y = max(a, b)
	d = c
	if x * (1 + d) < y:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(r, b, d) = map(int, input().split(' '))
	p = min(r, b)
	if (1 + d) * p >= max(r, b):
		print('Yes')
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase
_print = print
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def inp():
	return sys.stdin.readline().rstrip()

def mpint():
	return map(int, inp().split(' '))

def itg():
	return int(inp())

def solve():
	(mn, mx, d) = mpint()
	if mn > mx:
		(mn, mx) = (mx, mn)
	return mx - mn * (d + 1) <= 0

def main():
	for _ in range(itg()):
		print('YES' if solve() else 'NO')
DEBUG = 0
URL = 'https://codeforces.com/contest/1519/problem/0'
if DEBUG == 1:
	import requests
	from ACgenerator.Y_Test_Case_Runner import TestCaseRunner
	runner = TestCaseRunner(main, URL)
	inp = runner.input_stream
	print = runner.output_stream
	runner.checking()
else:
	if DEBUG != 2:
		(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	if DEBUG:

		def print(*args, **kwargs):
			_print(*args, **kwargs)
			sys.stdout.flush()
	main()


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	m = min(a, b)
	ans = 'No'
	if c == 0 and a == b:
		ans = 'Yes'
	if c != 0 and m * c >= abs(a - b):
		ans = 'Yes'
	print(ans)


import math
t = int(input())
for i in range(t):
	(r, b, d) = [int(x) for x in input().split()]
	if d == 0:
		if r == b:
			print('YES')
		else:
			print('NO')
	else:
		diff = math.ceil(abs(r - b) / min(r, b))
		if diff <= d:
			print('YES')
		else:
			print('NO')


import sys
input = sys.stdin.readline
t = int(input())
while t > 0:
	t -= 1
	(r, b, d) = map(int, input().split())
	x = min(r, b)
	if (d + 1) * x >= max(r, b) and r >= 1 and (b >= 1):
		print('YES')
	else:
		print('NO')


t = int(input())
for l in range(t):
	(r, b, d) = map(int, input().split())
	maxs = max(b, r)
	mins = min(b, r)
	if maxs > mins * (d + 1):
		print('NO')
	else:
		print('YES')


for test in range(int(input())):
	arr = list(map(int, input().split()))
	r = arr[0]
	b = arr[1]
	d = arr[2]
	mx = max(r, b)
	mn = min(r, b)
	if mx <= mn * (d + 1):
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	(r, b, d) = map(int, input().split())
	m = min(r, b)
	e = max(r, b) / m
	if e - int(e) != 0:
		e = e + 1
	if int(e) - 1 > d:
		print('NO')
	else:
		print('YES')


import math
for i in range(int(input())):
	(r, b, d) = [int(x) for x in input().split(' ')]
	if b > r:
		(r, b) = (b, r)
	difference = r - b
	if difference <= d:
		print('YES')
	else:
		difference = math.ceil(difference / b)
		if difference <= d:
			print('YES')
		else:
			print('NO')


import sys
input = sys.stdin.readline

def solve():
	(r, b, d) = map(int, input().split())
	(a, b) = (max(r, b), min(r, b))
	ext = a - b
	n = b
	diff = ext // n
	if ext % n > 0:
		diff += 1
	return 'YES' if diff <= d else 'NO'
for _ in range(int(input())):
	print(solve())


t = int(input())
while t:
	t -= 1
	(r, b, d) = list(map(int, input().split()))
	if d == 0 and r != b:
		print('NO')
	elif d == 0 and r == b:
		print('YES')
	else:
		m = min(r, b)
		ma = max(r, b)
		if ma - m <= d * m:
			print('YES')
		else:
			print('NO')


def solve():
	(r, b, d) = map(int, input().split(' '))
	packets = min(r, b)
	ma = max(r, b)
	if d == 0:
		if r == b:
			return 'YES'
		return 'NO'
	needed = -1
	if ma % packets == 0:
		needed = ma // packets
	else:
		needed = ma // packets + 1
	if needed - 1 <= d:
		return 'YES'
	return 'NO'
cases = int(input())
for case in range(cases):
	print(solve())


for t in range(int(input())):
	(a, b, c) = [int(j) for j in input().split()]
	if b < a:
		(a, b) = (b, a)
	mx = a * (c + 1)
	if b <= mx:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	(r, b, d) = map(int, input().split())
	big = max(r, b)
	small = min(r, b)
	diff = big - small
	if diff / small <= d:
		print('YES')
	else:
		print('NO')
	t = t - 1


t = int(input())
for _ in range(t):
	(r, b, d) = [int(e) for e in input().split()]
	x = min(r, b)
	y = x + x * d
	if y >= max(r, b):
		print('YES')
	else:
		print('NO')


def fun():
	for _ in range(int(input())):
		(a, b, c) = map(int, input().split())
		if c == 0:
			if a == b:
				print('YES')
			else:
				print('NO')
			continue
		bags = 0
		if abs(b - a) % c == 0:
			bags = abs(b - a) // c
		else:
			bags = abs(b - a) // c + 1
		if bags > min(a, b):
			print('NO')
		else:
			print('YES')
fun()


import math

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

def getstr():
	return [str(i) for i in input().split()]

def solve():
	(a, b, k) = getint()
	a_ = min(a, b) * (1 + k)
	b_ = max(a, b)
	if a_ >= b_:
		print('YES')
	else:
		print('NO')
for _ in range(int(input())):
	solve()


import os
import sys
from io import BytesIO, IOBase

def main():
	import bisect
	import math
	alpha = 'abcdefghijklmnopqrstuvwxyz'
	ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
	inf = 1e+17
	mod = 10 ** 9 + 7

	def factorial(n):
		f = 1
		for i in range(1, n + 1):
			f = f * i % mod
		return f

	def ncr(n, r):
		num = den = 1
		for i in range(r):
			num = num * (n - i) % mod
			den = den * (i + 1) % mod
		return num * pow(den, mod - 2, mod) % mod

	def solve(r, b, d):
		Max = max(r, b)
		Min = min(r, b)
		if math.ceil(Max / Min) <= d + 1:
			return 'YES'
		return 'NO'
		pass
	t = int(input())
	ans = []
	for _ in range(t):
		(r, b, d) = map(int, input().split())
		ans.append(solve(r, b, d))
	for j in range(len(ans)):
		print(ans[j])
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a < b:
		(a, b) = (b, a)
	if a / b <= c + 1:
		print('YES')
	else:
		print('NO')


def can_pack_jelly(r, b, d):
	g = max(r, b)
	l = min(r, b)
	return l * (d + 1) >= g
import sys
lines = []
for line in sys.stdin:
	lines.append(line)
task_items = [line.split(' ') for line in lines[1:]]
for item in task_items:
	r = int(item[0])
	b = int(item[1])
	d = int(item[2])
	if can_pack_jelly(r, b, d):
		print('YES')
	else:
		print('NO')


z = int(input())
for _ in range(z):
	(r, b, d) = map(int, input().split())
	if r > b:
		n = r // b
		k = r % b
	else:
		n = b // r
		k = b % r
	if k >= 1:
		n = n + 1
	if abs(1 - n) <= d:
		print('YES')
	else:
		print('NO')


import math
test_cases = int(input())
for test_case in range(test_cases):
	(r, b, d) = list(map(int, input().split()))
	minm = min(r, b)
	if abs(r - b) / minm <= d:
		print('YES')
	else:
		print('NO')


kacdefa = int(input())
for i in range(0, kacdefa):
	(a, b, c) = map(int, input().split())
	kucukolan = min(a, b)
	buyukolan = max(a, b)
	if kucukolan * (c + 1) >= buyukolan:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(temp, c) = (0, 0)
	(n, m, d) = map(int, input().split())
	less = min(n, m)
	more = max(n, m)
	temp = more / less - 1
	if temp <= d:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(r, b, d) = map(int, input().split(' '))
	p = min(r, b)
	r -= p
	b -= p
	r = 1 + math.ceil(r / p)
	b = 1 + math.ceil(b / p)
	if abs(r - b) <= d:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(r, b, d) = map(int, input().split())
	print({True: 'YES', False: 'NO'}[max(r, b) <= min(r, b) * (d + 1)])