Consider the array $a$ composed of all the integers in the range $[l, r]$. For example, if $l = 3$ and $r = 7$, then $a = [3, 4, 5, 6, 7]$.

Given $l$, $r$, and $k$, is it possible for $\gcd(a)$ to be greater than $1$ after doing the following operation at most $k$ times?

Choose $2$ numbers from $a$.

Permanently remove one occurrence of each of them from the array.

Insert their product back into $a$.

$\gcd(b)$ denotes the greatest common divisor (GCD) of the integers in $b$.


-----Input-----

The first line of the input contains a single integer $t$ ($1 \le t \le 10^5$) — the number of test cases. The description of test cases follows.

The input for each test case consists of a single line containing $3$ non-negative integers $l$, $r$, and $k$ ($1 \leq l \leq r \leq 10^9, \enspace 0 \leq k \leq r - l$).


-----Output-----

For each test case, print "YES" if it is possible to have the GCD of the corresponding array greater than $1$ by performing at most $k$ operations, and "NO" otherwise (case insensitive).


-----Examples-----

Input
9
1 1 0
3 5 1
13 13 0
4 4 0
3 7 4
4 10 3
2 4 0
1 7 3
1 5 3
Output
NO
NO
YES
YES
YES
YES
NO
NO
YES


-----Note-----

For the first test case, $a = [1]$, so the answer is "NO", since the only element in the array is $1$.

For the second test case the array is $a = [3, 4, 5]$ and we have $1$ operation. After the first operation the array can change to: $[3, 20]$, $[4, 15]$ or $[5, 12]$ all of which having their greatest common divisor equal to $1$ so the answer is "NO".

For the third test case, $a = [13]$, so the answer is "YES", since the only element in the array is $13$.

For the fourth test case, $a = [4]$, so the answer is "YES", since the only element in the array is $4$.

Difficulty: EASY
Tags: Number theory

Mathematics

Greedy algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
from sys import stdin

def solve():
	results = []
	for _ in range(int(stdin.readline().strip())):
		(l, r, k) = map(int, stdin.readline().rstrip().split())
		if l == r and l > 1:
			results.append('YES')
			continue
		cnt = (r - l) // 2
		if r % 2 or l % 2:
			cnt += 1
		if k >= cnt:
			results.append('YES')
		else:
			results.append('NO')
	print('\n'.join(results))
solve()


for s in [*open(0)][1:]:
	(l, r, k) = map(int, s.split())
	print('YNEOS'[r < 2 or (r > l and (r + 1) // 2 - l // 2 > k)::2])


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(l, r, k) = map(int, input().strip().split())
	if l == r and l != 1:
		print('YES')
		continue
	if l & 1 and (r - l + 2) // 2 <= k:
		print('YES')
		continue
	elif not l & 1 and (r - l + 1) // 2 <= k:
		print('YES')
		continue
	print('NO')


otv = []
for _ in range(int(input())):
	(l, r, k) = map(int, input().split())
	if l == r == 1:
		otv.append('NO')
		continue
	if l == r:
		otv.append('YES')
		continue
	if l % 2 == 1 and r % 2 == 1:
		n = (r - l + 2) // 2
	elif l % 2 == 1 and r % 2 == 0:
		n = (r - l + 1) // 2
	elif l % 2 == 0 and r % 2 == 1:
		n = (r - l + 1) // 2
	else:
		n = (r - l) // 2
	if n <= k:
		otv.append('YES')
	else:
		otv.append('NO')
print('\n'.join(otv))


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(l, r, k) = map(int, input().split())
	odds = (r - l) // 2 + int(l % 2 + r % 2 >= 1)
	if odds <= k or (r == l and l != 1):
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
num_test_cases = int(input())
for test_case_ittr in range(num_test_cases):
	(left, right, num_moves) = [int(x) for x in input().split()]
	if left == right == 1:
		print('NO')
		continue
	if num_moves == right - left:
		print('YES')
		continue
	num_odds_in_range = (right + 1) // 2 - left // 2
	print('YES' if num_odds_in_range <= num_moves else 'NO')


import sys
input = sys.stdin.readline
for i in range(int(input())):
	(l, r, k) = map(int, input().split())
	if r == l and r != 1:
		print('YES')
	else:
		if r % 2 != 0:
			r += 1
		if l % 2 != 0:
			l -= 1
		if (r - l + 1) // 2 <= k:
			print('YES')
		else:
			print('NO')


import sys
input = sys.stdin.readline
t = int(input())
while t > 0:
	(l, r, k) = map(int, input().split())
	if l == r and l != 1:
		print('YES')
	else:
		x = (r - l) // 2
		if r % 2 != 0 or l % 2 != 0:
			x += 1
		if x > k:
			print('NO')
		else:
			print('YES')
	t -= 1


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(l, r, k) = map(int, input().split())
	if k == 0:
		if l == r:
			if l != 1:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	else:
		odd = (r - l) // 2
		if r % 2 != 0 or l % 2 != 0:
			odd += 1
		even = r - l + 1 - odd
		if odd > k:
			print('NO')
		else:
			print('YES')


import sys
input = sys.stdin.readline
for _ in range(int(input().strip())):
	(l, r, k) = map(int, input().split())
	if l == r:
		if l == 1:
			print('NO')
		else:
			print('YES')
		continue
	n = r - l + 1
	if l % 2 == 0:
		if n - (n // 2 + n % 2) <= k:
			print('YES')
		else:
			print('NO')
	elif n // 2 + n % 2 <= k:
		print('YES')
	else:
		print('NO')


import math
import sys
import itertools
import fractions
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
for t in wtf[1:]:
	(l, r, k) = map(int, t.split())
	N = r - l + 1
	if N % 2 == 0 and k >= N // 2 or (N % 2 != 0 and k >= N // 2 + 1) or (N % 2 != 0 and r % 2 == 0 and (k >= N // 2)) or (N == 1 and l != 1):
		print('YES')
	else:
		print('NO')


import sys
from sys import stdin, stdout
from math import ceil, floor, sqrt, log, log2, log10
from collections import Counter
int_max = float('inf')
int_min = -float('inf')
mod = 10 ** 9 + 7
ANS = []
input = stdin.readline

def solve():
	pass
t = int(input())
for i in range(t):
	(l, r, k) = map(int, input().split())
	n = r - l + 1
	if n % 2 == 0:
		x = n // 2
	elif l % 2 == 1:
		x = n // 2 + 1
	else:
		x = n // 2
	if n == 1 and l != 1:
		print('YES')
		continue
	if x <= k:
		print('YES')
	else:
		print('NO')


import math, sys
input = sys.stdin.readline
S = lambda : input().rstrip()
I = lambda : int(S())
M = lambda : map(int, S().split())
L = lambda : list(M())
mod1 = 1000000007
mod2 = 998244353
for _ in range(I()):
	(l, r, k) = M()
	ans = (r - l + 1) // 2
	if l == r:
		print('YES' if l != 1 else 'NO')
		continue
	if l % 2 == 1 and r % 2 == 1:
		ans += 1
	print('YES' if ans <= k else 'NO')


def solve(l, r, k):
	if (l != 1 and r != 1) and (l == r or k == r - l):
		return True
	n = r - l + 1
	even = n // 2
	odd = even
	if n % 2:
		even = (n - 1) // 2
		odd = (n - 1) // 2
		if l % 2:
			odd += 1
		else:
			even += 1
	if k < odd:
		return False
	else:
		return True
out = []
t = int(input())
for case in range(t):
	s = list(map(int, input().split(' ')))
	(l, r, k) = (s[0], s[1], s[2])
	if solve(l, r, k):
		out.append('YES')
	else:
		out.append('NO')
print('\n'.join(out))


import sys
import math
from math import gcd, sqrt, log2, ceil, floor
import heapq as hq
from bisect import bisect_right, bisect_left, bisect
import itertools
from sys import stdin, stdout, setrecursionlimit

def isPowerOfTwo(x):
	return x and (not x & x - 1)
MOD = int(1000000000.0) + 7
alp = 'abcdefghijklmnopqrstuvwxyz'
v = {'a': 1, 'e': 1, 'i': 1, 'o': 1, 'u': 1}
c = {}
T = 1
T = int(stdin.readline())
for _ in range(T):
	(l, r, k) = list(map(int, stdin.readline().rstrip().split()))
	s = r - l + 1
	if k == 0:
		if s == 1:
			if l == 1:
				print('NO')
			else:
				print('YES')
		else:
			print('NO')
	else:
		odd = s // 2
		if l & 1 and r & 1:
			odd += 1
		if odd <= k:
			print('YES')
		else:
			print('NO')


from math import gcd
import sys
input = sys.stdin.readline
MAX = sys.maxsize
sys.setrecursionlimit(10 ** 9)

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

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

def solve(l, r, k):
	if l == r:
		return 'NO' if l == 1 else 'YES'
	diff = r - l + 1 - (r // 2 - (l - 1) // 2)
	return 'YES' if diff <= k else 'NO'
for _ in range(inp()):
	(l, r, k) = read_int_list()
	print(solve(l, r, k))


from sys import stdin
from math import gcd, ceil

def rei():
	return list(map(int, stdin.readline().strip().split(' ')))

def res():
	return stdin.readline().rstrip()

def prno():
	print('NO')

def pryes():
	print('YES')

def solve():
	(l, r, k) = rei()
	A = r - l + 1
	if A == 1:
		if l == 1:
			prno()
		else:
			pryes()
		return
	if l % 2 == 0:
		n = ceil(A / 2)
	else:
		n = A // 2
	if A - n <= k:
		pryes()
	else:
		prno()
t = rei()[0]
for _ in range(t):
	solve()


import sys
input = lambda : sys.stdin.readline().strip()
sys.setrecursionlimit(10 ** 9)
for _ in [0] * int(input()):
	(l, r, k) = map(int, input().split())
	if l == r:
		if l == r == 1:
			print('NO')
		else:
			print('YES')
	elif k == r - l:
		print('YES')
	elif k >= (r - l + l % 2 + 1) // 2:
		print('YES')
	else:
		print('NO')


import math
import sys
from operator import itemgetter
input = sys.stdin.readline

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())
number_tests = inp()
for _ in range(number_tests):
	numbers = inlt()
	l = numbers[0]
	r = numbers[1]
	k = numbers[2]
	if l == r:
		print('YES' if r > 1 else 'NO')
	else:
		pare = r // 2 - (l - 1) // 2
		impare = r - l + 1 - pare
		print('YES' if k >= impare else 'NO')


import math
import functools
import sys
from typing import OrderedDict
input = sys.stdin.readline

def ii():
	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())
import collections
for _ in range(ii()):
	(l, r, k) = map(int, input().split())
	if l == r:
		print('YES' if l > 1 else 'NO')
	else:
		odd = even = (r - l + 1) // 2
		if r % 2 == l % 2:
			if r % 2 == 1:
				odd += 1
			else:
				even += 1
		print('YES' if k >= odd else 'NO')


import sys

def _input_iter():
	for line in sys.stdin:
		for part in line.strip().split(' '):
			stripped = part.strip()
			if stripped:
				yield stripped
stream = _input_iter()

def read_int():
	return int(next(stream))

def read_str():
	return next(stream)

def count_odd(L, R):
	N = (R - L) // 2
	if R % 2 != 0 or L % 2 != 0:
		N += 1
	return N

def run():
	l = read_int()
	r = read_int()
	k = read_int()
	if r == l:
		if r == 1:
			print('NO')
		else:
			print('YES')
	elif count_odd(l, r) <= k:
		print('YES')
	else:
		print('NO')
test_cases = read_int()
for _ in range(test_cases):
	run()


import math
from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(l, r, k) = [int(i) for i in input().split()]
	n = r - l + 1
	if n % 2 == 0:
		x = n // 2
	elif l % 2:
		x = n // 2 + 1
	else:
		x = n // 2
	if n == 1 and l != 1:
		print('YES')
		continue
	if x > k:
		print('NO')
	else:
		print('YES')


import sys

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

def get_array():
	return list(get_ints())

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

def count_odd(l, r):
	n = (r - l) // 2
	if r % 2 != 0 or l % 2 != 0:
		n += 1
	return n
T = int(input())
while T > 0:
	(l, r, k) = get_ints()
	odd = count_odd(l, r)
	even = r - l + 1 - odd
	if l == r:
		if l == 1:
			print('NO')
		else:
			print('YES')
	elif k >= odd:
		print('YES')
	else:
		print('NO')
	T -= 1


import sys
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
results = []

def getNumberOfOddsAndEvens(left, right):
	n = right - left + 1
	evens = 0
	if n % 2 == 0:
		evens = n // 2
	elif left % 2 == 0:
		evens = n // 2 + 1
	else:
		evens = n // 2
	return (n - evens, evens)
for _ in range(inp()):
	[l, r, k] = inlt()
	n = r - l + 1
	[odds, evens] = getNumberOfOddsAndEvens(l, r)
	if l == 1 and r == 1:
		results.append('NO')
	elif k == 0:
		if n == 1:
			results.append('YES')
		else:
			results.append('NO')
	elif odds <= k:
		results.append('YES')
	else:
		results.append('NO')
for r in results:
	print(r)


t = int(input())
list_res = []

def GCD(lkr):
	fim = lkr[1]
	inicio = lkr[0]
	a_size = fim - inicio + 1
	if a_size == 1:
		if inicio == 1 or inicio == 0:
			return 'NO'
		else:
			return 'YES'
	if fim % 2 == 0 or inicio % 2 == 0:
		quantidade_impares = a_size // 2
	else:
		quantidade_impares = a_size // 2 + 1
	if quantidade_impares > lkr[2]:
		return 'NO'
	else:
		return 'YES'
for i in range(t):
	lrk = input().split()
	lrk = [int(j) for j in lrk]
	list_res.append(GCD(lrk))
for o in list_res:
	print(o)


import sys
input = sys.stdin.readline

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

def solution(l: int, r: int, k: int) -> str:
	if r - l == 0 and r != 1:
		return 'YES'
	if l % 2 == 0:
		cnt_odd = (r - l + 1) // 2
	else:
		cnt_even = (r - l + 1) // 2
		cnt_odd = r - l + 1 - cnt_even
	if cnt_odd <= k:
		return 'YES'
	else:
		return 'NO'
t = int(input())
for tc in range(t):
	(l, r, k) = map(int, input().split())
	sol = solution(l, r, k)
	print(sol)


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	(l, r, k) = [int(item) for item in input().split()]
	check = r - l + 1
	ans = check // 2
	flag = False
	if l % 2 == 1 and r % 2 == 1:
		ans += 1
	if l == r == 1:
		check += 1
	if ans <= k or check == 1:
		flag = True
	if flag:
		print('YES')
	else:
		print('NO')


a = int(input())
res = []
for i in range(a):
	stroka_1 = input().split()
	l = int(stroka_1[0])
	r = int(stroka_1[1])
	k = int(stroka_1[2])
	if k == 0 and r == l and (r != 1):
		res.append('YES')
	elif (r - l + 1) % 2 == 0:
		if k >= (r - l + 1) // 2:
			res.append('YES')
		else:
			res.append('NO')
	elif (r - l + 1) % 2 != 0:
		if l % 2 == 0:
			if k >= (r - l + 1) // 2:
				res.append('YES')
			else:
				res.append('NO')
		elif k >= (r - l + 1) // 2 + 1:
			res.append('YES')
		else:
			res.append('NO')
for i in res:
	print(i)


t = int(input())
answer = []
for i in range(t):
	(l, r, k) = map(int, input().split())
	if r - l == 0:
		if l == 1:
			answer.append('NO')
		else:
			answer.append('YES')
	elif r - l == 1:
		if k == 0:
			answer.append('NO')
		else:
			answer.append('YES')
	else:
		if l % 2 == 1 and r % 2 == 1:
			n = (r - l) / 2
		else:
			n = int((r - l) / 2) + 1
		if k >= r - l + 1 - n:
			answer.append('YES')
		else:
			answer.append('NO')
for answers in answer:
	print(answers)


t = int(input())
results = []
for i in range(t):
	(l, r, k) = input().split()
	(l, r, k) = (int(l), int(r), int(k))
	ans = 'NO'
	if l != r:
		a = l % 2
		b = r % 2
		if a and b:
			if k >= (r - l) / 2 + 1:
				ans = 'YES'
		elif not a and (not b):
			if k >= (r - l) / 2:
				ans = 'YES'
		elif k >= (r - l + 1) / 2:
			ans = 'YES'
	elif l != 1:
		ans = 'YES'
	results.append(ans)
for result in results:
	print(result)


times = int(input())
ans = []
for time in range(times):
	lrk = input().split()
	if lrk[0] == lrk[1]:
		if lrk[0] == '1':
			ans.append('NO')
			continue
		ans.append('YES')
		continue
	if int(lrk[0]) % 2 == 0 and int(lrk[1]) % 2 == 0:
		if (int(lrk[1]) - int(lrk[0])) // 2 <= int(lrk[2]):
			ans.append('YES')
			continue
	elif (int(lrk[1]) - int(lrk[0]) + 2) // 2 <= int(lrk[2]):
		ans.append('YES')
		continue
	ans.append('NO')
	continue
for i in ans:
	print(i)


import sys

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

def ri():
	return int(rl())

def ril():
	return [int(x) for x in rl().split(' ')]

def main():
	t = ri()
	for _ in range(t):
		(l, r, k) = ril()
		if l == r and l > 1:
			print('YES')
			continue
		l_even = l if l % 2 == 0 else l + 1
		r_even = r if r % 2 == 0 else r - 1
		div_two = (r_even - l_even) / 2 + 1
		no_div_two = r - l + 1 - div_two
		if k >= no_div_two:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
inplist = list()
for u in range(t):
	inplist.append(input())

def mainp(l, r, k):
	k1 = r - l
	if k1 == 0 and r == 1:
		print('NO')
	elif k1 == 0 and r != 1:
		print('YES')
	elif k1 % 2 == 1:
		barrier = int((k1 + 1) / 2)
		if k < barrier:
			print('NO')
		elif k >= barrier:
			print('YES')
	elif k1 % 2 == 0:
		barrier = int(k1 / 2)
		if l % 2 == 0 and k < barrier:
			print('NO')
		elif l % 2 == 0 and k >= barrier:
			print('YES')
		elif l % 2 == 1 and k <= barrier:
			print('NO')
		elif l % 2 == 1 and k > barrier:
			print('YES')
for string in inplist:
	lst = string.split()
	l = int(lst[0])
	r = int(lst[1])
	k = int(lst[2])
	mainp(l, r, k)


cases = range(int(input()))
func = lambda : [int(q) for q in input().split()]
ans = []
for _ in cases:
	(l, r, k) = func()
	first = True
	if k == 0:
		det = 0
	else:
		det = k + 1
	if l == r:
		if l == 1:
			ans.append('NO')
			continue
		if k == 0:
			ans.append('YES')
			continue
	if l % 2 == 1:
		tot = (r - l + 2) // 2
	else:
		tot = (r - l + 1) // 2
	if tot >= det:
		ans.append('NO')
	else:
		ans.append('YES')
for q in ans:
	print(q)


t = int(input())
answers = []
for i in range(t):
	(l, r, k) = map(int, input().split())
	ans = 'NO'
	n = (r - l + 1) // 2
	if l % 2 == 1 and r % 2 == 1:
		n += 1
	if l == r:
		ans = 'YES'
	if n <= k:
		ans = 'YES'
	if l == 1 and r == 1:
		ans = 'NO'
	answers.append(ans)
for i in answers:
	print(i)


res = []
for z in range(int(input())):
	(l, r, k) = (0, 0, 0)
	s = [int(x) for x in input().split()]
	l = int(s[0])
	r = int(s[1])
	k = int(s[2])
	if r - l == 0 and l != 1:
		res.append('YES')
	else:
		odd = (r + 1) // 2 - l // 2
		if k >= odd:
			res.append('YES')
		else:
			res.append('NO')
for i in res:
	print(i)


import math

def difference(first, second):
	num = abs(len(first) - len(second))
	if num:
		return 1000
	for i in range(min(len(first), len(second))):
		if first[i] != second[i]:
			num += 1
	return num
answers = []
for i in range(int(input())):
	(l, r, k) = map(int, input().split())
	even = 0
	odd = 0
	if l == r:
		if l == 1:
			ans = 'NO'
		else:
			ans = 'YES'
	else:
		length = r - l + 1
		if not l % 2 and (not r % 2):
			even = int(math.ceil(length / 2))
			odd = even - 1
		elif l % 2 and r % 2:
			odd = int(math.ceil(length / 2))
			even = odd - 1
		else:
			odd = length // 2
			even = length // 2
		if even > 0 and k >= odd:
			ans = 'YES'
		else:
			ans = 'NO'
	answers.append(ans)
for i in answers:
	print(i)


n = int(input())
b = []
for i in range(n):
	a = list(map(int, input().split(' ')))
	b.append(a)
for i in range(len(b)):
	k = b[i][2]
	l = b[i][0]
	r = b[i][1]
	if l == r and l != 1:
		print('YES')
	elif l == r and l == 1:
		print('NO')
	else:
		n = r - l + 1
		if n % 2 == 0 and k >= n / 2:
			print('YES')
		elif n % 2 == 1 and k >= n // 2 + 1:
			print('YES')
		elif n % 2 == 1 and l % 2 == 0 and (r % 2 == 0) and (k >= n // 2):
			print('YES')
		else:
			print('NO')


NTC = int(input())
TCL = []
i = 0
while i < NTC:
	strin = input()
	strin = strin.split(' ')
	TCL.append(strin)
	i = i + 1
i = 0
while i < NTC:
	l = int(TCL[i][0])
	r = int(TCL[i][1])
	k = int(TCL[i][2])
	dist = r - l
	if l == r and l > 1:
		print('YES')
	else:
		if l % 2 == 0 and r % 2 == 0:
			checker = dist // 2
		else:
			checker = dist // 2 + 1
		if checker > k:
			print('NO')
		else:
			print('YES')
	i = i + 1


def main():
	t = int(input())
	for i in range(t):
		(l, r, k) = [int(i) for i in input().split()]
		if l == r and l > 1:
			print('YES')
			continue
		n = (r - l + 1) // 2
		if l % 2 == 1 and r % 2 == 1:
			n += 1
		if k >= n:
			print('YES')
			continue
		print('NO')
main()


def processing(a, b, c):
	if c == 0:
		if a == b and a != 1:
			return 'YES'
		else:
			return 'NO'
	requirement = (b - a + 1) // 2
	if a % 2 == 1 and b % 2 == 1:
		requirement += 1
	if requirement <= c:
		return 'YES'
	else:
		return 'NO'
n = int(input())
while n > 0:
	(a, b, c) = input().split()
	print(processing(int(a), int(b), int(c)))
	n -= 1


n = int(input())
for i in range(n):
	(l, r, k) = map(int, input().split())
	if l == r:
		print('YES' if l > 1 else 'NO')
	else:
		print('YES' if (r + 1) // 2 - l // 2 <= k else 'NO')


testCases = int(input())
for _ in range(testCases):
	(l, r, k) = map(int, input().split())
	if r == l:
		if r <= 1:
			print('NO')
		else:
			print('YES')
	elif (r - l) // 2 + (r % 2 or l % 2) <= k:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(l, r, k) = input().split()
	l = int(l)
	r = int(r)
	k = int(k)
	if r - l == 0 and r == 1:
		print('NO')
	elif r - l == 0 and r != 1:
		print('YES')
	elif (r - l) / 2 < k:
		print('YES')
	elif (r - l) / 2 == k:
		if l % 2 == 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	(l, h, k) = map(int, input().split())
	if l % 2 == 0 and h % 2 == 0 or (l == h and l != 1):
		cnt = (h - l) // 2
	else:
		cnt = (h - l) // 2 + 1
	if cnt <= k:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(l, r, k) = map(int, input().split())
	e = (r + 1) // 2 - l // 2
	if k >= e or l == r != 1:
		print('YES')
	else:
		print('NO')


import math
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

def main():
	t = int(input())
	for _ in range(t):
		(l, r, k) = map(int, input().split())
		L = r - l + 1
		if L == 1 and l > 1:
			print('YES')
			continue
		if l % 2 == 0:
			print('YES' if k >= L // 2 else 'NO')
		elif L % 2 == 0:
			print('YES' if k >= L // 2 else 'NO')
		else:
			print('YES' if k >= L // 2 + 1 else 'NO')
main()


for _ in range(int(input())):
	(l, r, k) = map(int, input().split())
	t = (r - l + 1) // 2
	if r % 2 == 1 and l % 2 == 1:
		t += 1
	if k >= t or (l - r == 0 and l != 1):
		print('YES')
	else:
		print('NO')


for l in range(int(input())):
	(l, r, k) = map(int, input().split())
	m = (r - l + 1 + l % 2) // 2
	if l == r and l != 1:
		m = 0
	if k >= m:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(l, r, k) = map(int, input().split())
	good_k = (r - l + 1) // 2
	if l - r == 0 and r > 1:
		print('YES')
	elif k > good_k:
		print('YES')
	elif k == good_k and (r % 2 == 0 or l % 2 == 0):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(l, r, k) = map(int, input().split())
	p = r - l + 1
	if r == l and r != 1:
		print('YES')
	elif (r - l + 1) % 2 == 0:
		if k >= p // 2:
			print('YES')
		else:
			print('NO')
	elif l % 2 == 0:
		if k >= (p - 1) // 2:
			print('YES')
		else:
			print('NO')
	elif k >= (p + 1) // 2:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(l, r, k) = input().split()
	l = int(l)
	r = int(r)
	k = int(k)
	multip = 1
	if l % 2 == 0 and r % 2 == 0:
		multip = 0
	n_odd = (r - l) // 2 + multip
	if l == r and l == 1:
		print('NO')
	elif k >= n_odd or l == r:
		print('YES')
	else:
		print('NO')


def solve():
	(l, r, k) = input().split()
	l = int(l)
	r = int(r)
	k = int(k)
	if k == 0:
		if r == 1 and l == 1:
			print('NO')
		elif r == l:
			print('YES')
		elif r != l:
			print('NO')
	elif r % 2 == 1 and l % 2 == 1:
		if k >= (r - l + 1) // 2 + 1:
			print('YES')
		else:
			print('NO')
	elif k >= (r - l + 1) // 2:
		print('YES')
	else:
		print('NO')
t = int(input())
while t:
	solve()
	t -= 1


import math
a = int(input())
for i in range(a):
	(d, r, k) = map(int, input().split())
	if d == r and d % 2 == 1:
		if d != 1:
			print('YES')
			continue
		else:
			print('NO')
			continue
	if d % 2 == 1 and r % 2 == 1:
		nechet = (r - d + 1) // 2 + 1
	else:
		nechet = (r - d + 1) // 2
	if k >= nechet:
		print('YES')
	else:
		print('NO')


import math

def solve():
	for t in range(int(input())):
		(l, r, k) = map(int, input().split())
		if l == r:
			if l == 1:
				print('NO')
			if l > 1:
				print('YES')
		else:
			ln = r - l + 1
			if l % 2 == 1 and r % 2 == 1:
				no = (r - l) // 2
				no += 1
			else:
				no = r - l + 1
				no = no // 2
			if no > k:
				print('NO')
			else:
				print('YES')
solve()


t = int(input())
while t > 0:
	(a, b, k) = map(int, input().split())
	if a == b:
		if a == 1:
			print('NO')
		else:
			print('YES')
		t -= 1
		continue
	p = (b - a + 1) // 2
	if a % 2 == 1 and b % 2 == 1:
		p += 1
	if p <= k:
		print('YES')
	else:
		print('NO')
	t -= 1


for _ in range(int(input())):
	(l, r, k) = list(map(int, input().split()))
	c = (r + 1) // 2 - l // 2
	if k >= c or (l == r and l > 1):
		print('YES')
	else:
		print('NO')