Anna is a girl so brave that she is loved by everyone in the city and citizens love her cookies. She is planning to hold a party with cookies. Now she has $a$ vanilla cookies and $b$ chocolate cookies for the party.

She invited $n$ guests of the first type and $m$ guests of the second type to the party. They will come to the party in some order. After coming to the party, each guest will choose the type of cookie (vanilla or chocolate) to eat. There is a difference in the way how they choose that type:

If there are $v$ vanilla cookies and $c$ chocolate cookies at the moment, when the guest comes, then  if the guest of the first type: if $v>c$ the guest selects a vanilla cookie. Otherwise, the guest selects a chocolate cookie.  if the guest of the second type: if $v>c$ the guest selects a chocolate cookie. Otherwise, the guest selects a vanilla cookie. 

After that:  If there is at least one cookie of the selected type, the guest eats one.  Otherwise (there are no cookies of the selected type), the guest gets angry and returns to home. 

Anna wants to know if there exists some order of guests, such that no one guest gets angry. Your task is to answer her question.


-----Input-----

The input consists of multiple test cases. The first line contains a single integer $t$ ($1 \le t \le 1000$) — the number of test cases. Next $t$ lines contain descriptions of test cases.

For each test case, the only line contains four integers $a$, $b$, $n$, $m$ ($0 \le a,b,n,m \le 10^{18}, n+m \neq 0$).


-----Output-----

For each test case, print the answer in one line. If there exists at least one valid order, print "Yes". Otherwise, print "No".

You can print each letter in any case (upper or lower).


-----Example-----
Input
6
2 2 1 2
0 100 0 1
12 13 25 1
27 83 14 25
0 0 1 0
1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000

Output
Yes
No
No
Yes
No
Yes



-----Note-----

In the first test case, let's consider the order $\{1, 2, 2\}$ of types of guests. Then:  The first guest eats a chocolate cookie. After that, there are $2$ vanilla cookies and $1$ chocolate cookie.  The second guest eats a chocolate cookie. After that, there are $2$ vanilla cookies and $0$ chocolate cookies.  The last guest selects a chocolate cookie, but there are no chocolate cookies. So, the guest gets angry. 

So, this order can't be chosen by Anna.

Let's consider the order $\{2, 2, 1\}$ of types of guests. Then:  The first guest eats a vanilla cookie. After that, there is $1$ vanilla cookie and $2$ chocolate cookies.  The second guest eats a vanilla cookie. After that, there are $0$ vanilla cookies and $2$ chocolate cookies.  The last guest eats a chocolate cookie. After that, there are $0$ vanilla cookies and $1$ chocolate cookie. 

So, the answer to this test case is "Yes".

In the fifth test case, it is illustrated, that the number of cookies ($a + b$) can be equal to zero, but the number of guests ($n + m$) can't be equal to zero.

In the sixth test case, be careful about the overflow of $32$-bit integer type.

Source: codeforces | Difficulty: EASY
Tags: Mathematics

Implementation

Greedy algorithms


Solutions:
for _ in range(int(input())):
	(a, b, n, m) = list(map(int, input().split()))
	r = min(a, b)
	s = a + b
	if n + m > s:
		print('No')
	elif r < m:
		print('No')
	else:
		print('Yes')


Y = 'Yes'
N = 'No'
t = int(input())
for _ in range(t):
	(v, c, n, m) = map(int, input().split())
	if n + m > v + c:
		print(N)
	else:
		rest = min(max(v, c) - min(v, c), n)
		(mm, MM) = (min(v, c), max(v, c))
		MM -= rest
		n -= rest
		pos = (mm >= m or m == 0) and MM + mm - m >= n
		print(Y) if pos else print(N)


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	if min(a, b) < m:
		print('No')
		continue
	print('Yes')


import math

def isPrimes2(n):
	if n > 1:
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		for x in range(3, int(math.sqrt(n) + 1), 2):
			if n % x == 0:
				return False
		return True
	return False

def main():
	t = int(input())
	for i in range(t):
		(a, b, n, m) = map(int, input().split())
		flag = 0
		while flag == 0:
			if n + m > a + b:
				flag = 1
				print('No')
			elif a <= b:
				if m > a:
					flag = 1
					print('No')
				else:
					flag = 1
					print('Yes')
			elif m <= b:
				flag = 1
				print('Yes')
			else:
				flag = 1
				print('No')
main()


from sys import stdin, stdout
import math, queue, heapq
fastinput = stdin.readline
fastout = stdout.write
t = int(fastinput())
while t:
	t -= 1
	(v, c, n, m) = map(int, fastinput().split())
	if v - c > 0:
		d = v - c
		if c - m + v >= n and c >= m:
			print('Yes')
		else:
			print('No')
	elif v - c < 0:
		if v >= m and c + (v - m) >= n:
			print('Yes')
		else:
			print('No')
	elif m <= c and c - m + v >= n:
		print('Yes')
	else:
		print('No')


def func(a, b, n, m):
	if a + b < m + n:
		print('No')
		return
	if a != b:
		if n > abs(a - b):
			n -= abs(a - b)
			(a, b) = (min(a, b), min(a, b))
		else:
			if min(a, b) >= m:
				print('Yes')
			else:
				print('No')
			return
	mini = min(m, n)
	(a, b, n, m) = (a - mini, b - mini, n - mini, m - mini)
	if n == 0 and a < m:
		print('No')
	else:
		print('Yes')
cases = int(input())
for i in range(cases):
	(a, b, n, m) = map(int, input().split())
	func(a, b, n, m)


for _ in ' ' * int(input()):
	(a, b, n, m) = map(int, input().split())
	print('YNeos'[a + b < n + m or min(a, b) < m::2])


from math import *
t = int(input())
for i in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	if a + b >= n + m and min(a, b) >= m:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if min(a, b) >= m and n + m <= a + b:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('NO')
	elif m > min(a, b):
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
	elif min(a, b) >= m:
		print('Yes')
	else:
		print('No')


import math
r = int(input())
for i in range(r):
	(a, b, n, m) = map(int, input().split())
	if n + m <= a + b and m <= min(a, b):
		print('Yes')
	else:
		print('No')


a = int(input())
for i in range(a):
	(b, c, n, k) = map(int, input().split())
	if b > c:
		c -= k
	else:
		b -= k
	if b >= 0 and c >= 0:
		if b + c >= n:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(v, c, good, bad) = map(int, input().split())
	if bad > min(v, c) or good + bad > v + c:
		print('no')
	else:
		print('yes')


t = int(input())
for _ in range(t):
	(a, b, n, m) = list(map(int, input().strip().split()))
	if a + b >= n + m:
		if min(a, b) >= m:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def find_ans(a, b, n, m):
	if m <= min(a, b) and a + b >= n + m:
		return 'Yes'
	else:
		return 'No'
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	print(find_ans(a, b, n, m))


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(A, B, N, M) = [int(x) for x in input().split()]
		if N + M > A + B:
			print('No')
			continue
		if A > B:
			if B >= M:
				print('Yes')
			else:
				print('No')
		elif A >= M:
			print('Yes')
		else:
			print('No')
main()


T = int(input())
for i in range(T):
	(a, b, c, d) = map(int, input().split())
	m = min(a, b)
	if m < d:
		print('No')
	elif a + b < c + d:
		print('No')
	else:
		print('Yes')


def chocolates(a, b, n, m):
	if a + b < n + m:
		return 'No'
	elif min(a, b) < m:
		return 'No'
	else:
		return 'Yes'
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	out = chocolates(a, b, n, m)
	print(out)


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	q = min(n, abs(a - b))
	n -= q
	if a > b:
		a -= q
	else:
		b -= q
	q = min(n, m)
	a -= q
	b -= q
	n -= q
	m -= q
	if n:
		res = a + b - n
	else:
		res = min(a, b) - m
	print('Yes' if res >= 0 else 'No')


q = int(input())
for _ in range(q):
	(o1, o2, t1, t2) = map(int, input().split())
	answer = True
	if t2 > min(o1, o2):
		answer = False
	if t1 + t2 > o1 + o2:
		answer = False
	if answer:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	(a, b, n, m) = map(int, input().split())
	if a + b >= n + m and m <= min(a, b):
		print('Yes')
	else:
		print('No')
	t -= 1


from collections import Counter
from collections import defaultdict
from collections import deque
import math
import heapq
import sys
import io, os
input = sys.stdin.readline
from bisect import *
rs = lambda : input().strip()
ri = lambda : int(input())
rl = lambda : list(map(int, input().strip().split()))
rls = lambda : list(map(str, input().split()))
t = int(input())
d = defaultdict(lambda : 0)
for _ in range(0, t):
	(a, b, n, m) = rl()
	if n + m <= a + b and min(a, b) >= m:
		print('Yes')
	else:
		print('No')


from sys import stdin
input = stdin.readline

def main():
	test = int(input())
	for _ in range(test):
		(a, b, n, m) = [int(i) for i in input().split(' ')]
		if a + b >= n + m and min(a, b) >= m:
			print('Yes')
		else:
			print('No')
main()


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b >= n + m and min(a, b) >= m:
		if a == 0 and m > 0:
			print('No')
		elif n >= m:
			print('Yes')
		elif n < m:
			if a > b and (b >= m or a - 1 >= m):
				print('Yes')
			elif a == b:
				print('Yes')
			elif a < b:
				if a >= m and b >= n:
					print('Yes')
			else:
				print('No')
	else:
		print('No')


for tt in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < m + n:
		print('No')
		continue
	if a > b:
		val = min(a - b, n)
		a -= val
		n -= val
	else:
		val = min(b - a, n)
		b -= val
		n -= val
	if a != b:
		if min(a, b) < m:
			print('No')
		else:
			print('Yes')
		continue
	if m > n and m > a:
		print('No')
		continue
	print('Yes')


for _ in ' ' * int(input()):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('NO')
	elif min(a, b) >= m:
		print('yes')
	elif max(a, b) <= n:
		print('yes')
	else:
		print('no')


t = int(input())
for testcase in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('NO\n')
		continue
	if min(a, b) < m:
		print('NO\n')
		continue
	print('YES\n')


import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque, Counter
from decimal import Decimal

def s():
	return input()

def i():
	return int(input())

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

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

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

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

def lcm(a, b):
	return a * b // math.gcd(a, b)
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 9
mod = 10 ** 9 + 7
t = i()
for i in range(t):
	(a, b, n, m) = I()
	if a + b < m + n:
		print('No')
	elif min(a, b) >= m:
		print('Yes')
	else:
		print('No')


def solve(a: int, b: int, n: int, m: int) -> bool:
	if a + b < n + m:
		return False
	if min(a, b) >= max(n, m):
		return True
	n -= min(abs(a - b), max(0, n - m))
	return min(a, b) >= m
tc = int(input())
while tc > 0:
	(a, b, n, m) = map(int, input().split())
	print('Yes' if solve(a, b, n, m) else 'No')
	tc -= 1


import os
import sys
from io import BytesIO, IOBase
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')
testcases = int(input())
for j in range(testcases):
	(v, c, n, m) = map(int, input().split())
	if n + m > v + c:
		print('No')
	elif v == c:
		val1 = min(c, m)
		c -= val1
		m -= val1
		if m == 0:
			print('Yes')
		else:
			print('No')
	elif v > c:
		val1 = min(c, m)
		c -= val1
		m -= val1
		if m == 0:
			print('Yes')
		else:
			print('No')
	else:
		val1 = min(v, m)
		v -= val1
		m -= val1
		if m == 0:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
	else:
		if a > b:
			(a, b) = (b, a)
		if a >= m:
			print('Yes')
		else:
			print('No')


t = int(input())
for x in range(t):
	(a, b, c, d) = map(int, input().split())
	temp = min(a, b)
	temp1 = max(a, b)
	if temp >= d and a + b >= c + d:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	if a + b < n + m:
		print('No')
	elif n <= abs(a - b):
		if n == abs(a - b):
			if m <= min(a, b):
				print('Yes')
			else:
				print('No')
		elif a > b:
			if m <= b:
				print('Yes')
			else:
				print('No')
		elif m <= a:
			print('Yes')
		else:
			print('No')
	else:
		n -= abs(a - b)
		if a <= b:
			b = a
		elif b <= a:
			a = b
		c = min(n, m)
		a -= c
		b -= c
		if n >= m:
			print('Yes')
		else:
			d = m - n
			if a >= d:
				print('Yes')
			else:
				print('No')


from sys import *
t = int(stdin.readline())
while t > 0:
	t -= 1
	(a, b, n, m) = map(int, stdin.readline().split())
	if a > b:
		(a, b) = (b, a)
	if a < m:
		print('No')
		continue
	if a + b < n + m:
		print('No')
		continue
	print('Yes')


def solve():
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		return False
	if min(a, b) < m:
		return False
	if a + b - m < n:
		return False
	return True
for _ in range(int(input())):
	if solve():
		print('Yes')
	else:
		print('No')


import math
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if (m > a or m > b) or a + b - m - n < 0:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	(a, b, n, m) = map(int, input().split())
	if min(a, b) >= m and a + b >= n + m:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	(a, b, n, m) = (l[0], l[1], l[2], l[3])
	if a >= b:
		if b >= m and a + b - m >= n:
			print('YES')
		else:
			print('NO')
	elif a >= m and b + a - m >= n:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	if a > b:
		if b >= m:
			print('Yes')
		else:
			print('No')
	elif a >= m:
		print('Yes')
	else:
		print('No')


from math import ceil
for _ in range(int(input())):
	(a, b, n, m) = [int(i) for i in input().split()]
	if m > min(a, b):
		print('No')
	elif m + n > a + b:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	Ans = 0
	(a, b, n, m) = map(int, input().split())
	if a + b >= n + m and min(a, b) >= m:
		print('Yes')
	else:
		print('No')


a = int(input())
for x in range(a):
	a = [int(x) for x in input().split()]
	if a[0] + a[1] >= a[2] + a[3] and a[3] <= min(a[0], a[1]):
		print('Yes')
	else:
		print('No')


from sys import stdin
N = int(stdin.readline())
for case in range(N):
	(c, v, g, b) = [int(i) for i in stdin.readline().split()]
	if c + v < g + b:
		print('No')
	elif b <= min(c, v):
		print('Yes')
	elif b > min(c, v) + 1:
		print('No')
	elif b > min(c, v):
		if abs(c - v) != g - b:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


t = int(input())
for q in range(t):
	(a, b, n, m) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	if a < m:
		print('No')
		continue
	if a + b < n + m:
		print('No')
		continue
	print('Yes')


for i in range(int(input())):
	(a, b, good, bad) = [int(i) for i in input().split()]
	if a + b < good + bad:
		print('No')
	elif min(a, b) >= bad:
		print('Yes')
	else:
		diff = max(a, b) - min(a, b)
		if good >= diff:
			good = good - diff
			rem = max(a, b) - diff
			if good > bad:
				print('Yes')
			elif good == bad:
				print('Yes')
			else:
				bad = bad - good
				rem = rem - good
				if rem >= bad:
					print('Yes')
				else:
					print('No')
		else:
			print('No')


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	(a, b, n, m) = map(int, stdin.readline().split())
	if a + b < n + m:
		print('No')
		continue
	if min(a, b) < m:
		print('No')
		continue
	print('Yes')


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	print(['No', 'Yes'][min(a, b) >= m and a + b >= n + m])


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if a + b < c + d:
		print('NO')
	elif min(a, b) < d:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if n + m <= a + b and m <= min(a, b):
		print('yes')
	else:
		print('no')


t = int(input())

def rec(mn, ind, l, b, dp):
	if ind == 0:
		return 0
	else:
		if dp[ind - 1] == 0:
			if mn[ind - 1][0] < l and mn[ind - 1][1] < b:
				dp[ind - 1] = max(rec(mn, ind - 1, l, b, dp), mn[ind - 1][2] + rec(mn, ind - 1, mn[ind - 1][0], mn[ind - 1][1], dp))
			else:
				dp[ind - 1] = rec(mn, ind - 1, l, b, dp)
		return dp[ind - 1]
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('No')
	elif min(a, b) < m:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	if a > b:
		d = a - b
		a -= min(n, d)
		n -= min(n, d)
	elif a < b:
		d = b - a
		b -= min(n, d)
		n -= min(n, d)
	if a > b:
		if b >= m:
			print('Yes')
		else:
			print('No')
	elif a < b:
		if a >= m:
			print('Yes')
		else:
			print('No')
	else:
		(a, b, n, m) = (a - min(a, n, m), a - min(a, n, m), n - min(a, n, m), m - min(a, n, m))
		if m != 0:
			if a >= m:
				print('Yes')
			else:
				print('No')
		elif n != 0:
			if a + b >= n:
				print('Yes')
			else:
				print('No')
		elif n == 0 and m == 0:
			print('Yes')
		else:
			print('No')


import sys
input = sys.stdin.readline
ans = []
for i in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		ans.append('NO')
		continue
	if m > min(a, b):
		ans.append('NO')
	else:
		ans.append('YES')
print(*ans, sep='\n')


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')

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

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = []
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors.append(i)
			n //= i
		i += 1
	if n > 1:
		factors.append(n)
	return factors

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

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

def main():
	(a, b, n, m) = vars()
	if m > min(a, b):
		print('No')
		return
	if a <= b:
		a -= m
	else:
		b -= m
	if a + b >= n:
		print('Yes')
	else:
		print('No')
t = int(input())
for _ in range(t):
	main()


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

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

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

def invr():
	return map(int, input().split())
k = inp()
for i in range(k):
	quadro = inlt()
	q1 = quadro[0]
	q2 = quadro[1]
	q3 = quadro[2]
	q4 = quadro[3]
	if q1 + q2 < q3 + q4:
		print('No')
	elif q1 >= q2 and q4 > q2:
		print('No')
	elif q1 < q2 and q4 > q1:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(a, b, n, m) = [int(k) for k in input().split()]
	if a + b >= n + m and min(a, b) >= m:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(v, c, n, m) = map(int, input().strip().split())
	mi = min(v, c)
	if v + c >= m + n and mi >= m:
		print('Yes')
	else:
		print('No')


T = int(input())
for _ in range(T):
	(A, B, N, M) = map(int, input().split())
	if A + B < N + M:
		print('NO')
		continue
	print('NO' if M > min(A, B) else 'YES')


for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	total = n + m
	if min(v, c) < m or v + c < total:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if n + m <= a + b and m <= min(a, b):
		print('YES')
	else:
		print('NO')


from math import ceil

def main():
	t = int(input())
	for i in range(t):
		(a, b, n, m) = map(int, input().split())
		if min(a, b) < m or a + b < n + m:
			print('No')
		else:
			print('Yes')
main()


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	total = a + b
	public = c + d
	if total < public:
		print('No')
	elif min(a, b) < d:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(0, t):
	nk = input().split()
	a = int(nk[0])
	b = int(nk[1])
	n = int(nk[2])
	m = int(nk[3])
	if a + b >= n + m and min(a, b) >= m:
		print('Yes')
	else:
		print('No')


t = input()
t = int(t)
while t > 0:
	t = int(t) - 1
	(a, b, n, m) = input().split()
	a = int(a)
	b = int(b)
	n = int(n)
	m = int(m)
	if a + b < n + m:
		print('NO')
		continue
	if min(a, b) < m:
		print('NO')
		continue
	print('YES')


def f(v, c, n, m):
	return v + c >= n + m and m <= min(v, c)
t = int(input())
d = {True: 'Yes', False: 'No'}
for _ in range(t):
	(a, b, n, m) = tuple(map(int, input().split()))
	print(d[f(a, b, n, m)])


t = int(input())
while t:
	l1 = [int(x) for x in input().split()]
	(a, b, n, m) = (l1[0], l1[1], l1[2], l1[3])
	if min(a, b) < m:
		print('No')
	elif a + b - m < n:
		print('No')
	else:
		print('Yes')
	t -= 1


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		z = list(map(int, input().split()))
		a = z[0]
		b = z[1]
		c = z[2]
		d = z[3]
		if a + b >= c + d and min(a, b) >= d:
			print('Yes')
		else:
			print('No')
main()


import sys
import math
from collections import defaultdict as dd
mod = 1000000007
T = 1
T = int(sys.stdin.readline())
for _ in range(T):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
	else:
		x = min(a, b)
		if x >= m:
			y = a + b - m
			if y >= 0:
				print('Yes')
			else:
				print('No')
		else:
			print('No')


t = int(input())
for you in range(t):
	l = input().split()
	a = int(l[0])
	b = int(l[1])
	n = int(l[2])
	m = int(l[3])
	if a + b < n + m:
		print('No')
		continue
	poss = 1
	if a < b:
		(b, a) = (a, b)
	if m <= b:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(v, c, n, m) = map(int, input().split())
	if v + c < n + m:
		print('No')
	elif min(v, c) >= m:
		print('Yes')
	else:
		print('No')


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

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

def problem(vanilla, chocolate, type_a, type_b):
	if vanilla + chocolate < type_a + type_b:
		print('No')
		return
	if min(vanilla, chocolate) < type_b:
		print('No')
		return
	print('Yes')
n = inp()
for _ in range(n):
	[van, choc, van_pep, choc_pep] = invr()
	problem(van, choc, van_pep, choc_pep)


from sys import stdin

def solve(a, b, n, m):
	if a > b:
		(a, b) = (b, a)
	if a + b < n + m:
		return False
	if a < m:
		return False
	return True
for _ in range(int(stdin.readline())):
	(a, b, n, m) = map(int, stdin.readline().strip().split())
	if solve(a, b, n, m):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	[v, c, n, m] = [int(x) for x in input().split()]
	if v + c < n + m:
		print('No')
	elif min(v, c) < m:
		print('No')
	else:
		print('Yes')


def sol():
	(v, c, a, b) = map(int, input().split())
	if min(v, c) >= b and v + c >= a + b:
		print('Yes')
	else:
		print('No')
for n in range(int(input())):
	sol()


for t in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	bool = True
	if n + m <= a + b:
		pass
	else:
		bool = False
	if m <= min(a, b):
		pass
	else:
		bool = False
	print('YES') if bool else print('NO')


z = input
from math import ceil, log, gcd, sqrt
n = int(z())
for i in range(n):
	(a, b, n, m) = map(int, z().split())
	if a + b < m + n or m > a or m > b:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	if v + c < n + m:
		print('No')
		continue
	if v > c:
		if m <= c:
			print('Yes')
		else:
			print('No')
	elif v < c:
		if m <= v:
			print('Yes')
		else:
			print('No')
	elif m <= v or m <= c:
		print('Yes')
	else:
		print('No')


import sys

def read_num_list():
	return [int(i) for i in sys.stdin.readline().split()]

def solve(_turn):
	(a, b, n, m) = read_num_list()
	if a + b < n + m:
		return False
	if m <= min(a, b):
		return True
	return False

def main():
	T = read_num_list()[0]
	for i in range(T):
		res = solve(i + 1)
		print('yes' if res else 'no')
main()


n = int(input())
for i in range(0, n):
	m = list(map(int, input().split()))[:4]
	if m[2] + m[3] > m[1] + m[0]:
		print('No')
	elif min(m[1], m[0]) >= m[3]:
		print('Yes')
	else:
		print('No')


def fname(a, b, n, m):
	if a + b < n + m:
		return 'No'
	if a < m or b < m:
		return 'No'
	return 'Yes'
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	print(fname(a, b, n, m))


import sys

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

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

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

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
for _ in range(INT()):
	(a, b, N, M) = MAP()
	if a > b:
		(a, b) = (b, a)
	a -= M
	if a < 0:
		No()
		continue
	if N <= a + b:
		Yes()
	else:
		No()


def main():
	(a, b, n, m) = map(int, input().split())
	if a > b:
		c = min(a - b, n)
		(a, n) = (a - c, n - c)
	else:
		c = min(b - a, n)
		(b, n) = (b - c, n - c)
	if a != b:
		if min(a, b) >= m:
			print('YES')
		else:
			print('NO')
	elif a >= max(n, m):
		print('YES')
	elif n > m:
		if a >= min(n, m) and a + b >= n + m:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')
t = int(input())
for i in range(t):
	main()


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	k = -1
	if a > b:
		k = a
		a = b
		b = k
	if a < m or a + b < n + m:
		print('No')
	else:
		print('yes')


from sys import stdin, stdout
import math
input = stdin.readline

def print(x='', y='', end='\n'):
	if y == '':
		stdout.write(str(x) + end)
	else:
		stdout.write(str(x) + ' ' + str(y) + end)

def solve():
	(a, b, n, m) = map(int, input().split())
	if a + b < m + n:
		print('NO')
		return
	if min(a, b) < m:
		print('NO')
	else:
		print('YES')
tt = 1
tt = int(input())
for __ in range(tt):
	solve()


import sys
import math

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

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

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

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	(a, b, n, m) = MI()
	ans = a + b >= n + m
	if a > b:
		if b < m:
			ans = False
	elif a < m:
		ans = False
	print('Yes' if ans else 'No')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('NO')
	elif min(a, b) < m:
		print('NO')
	else:
		print('YES')


from sys import stdin, stdout
from math import gcd, ceil, sqrt
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
tc = ii1()
for _ in range(tc):
	(a, b, n, m) = iia()
	if a + b < n + m:
		print('No')
	elif a >= b and b >= m:
		print('YES')
	elif a <= b and a >= m:
		print('YES')
	else:
		t1 = max(a, b)
		t2 = min(a, b)
		if n > 0:
			extra = t1 - t2
			if n >= extra:
				n -= extra
				t1 = t2
			else:
				n = 0
				t1 -= n
		if t1 == t2 and t1 >= m:
			print('Yes')
		elif min(t1, t2) >= m:
			print('Yes')
		else:
			print('No')


import sys
import math
import collections

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())):
	(a, b, n, m) = get_ints()
	if m <= min(a, b) and n + m <= a + b:
		print('YES')
	else:
		print('NO')


from sys import stdin
from bisect import bisect_left as bl
from bisect import bisect_right as br

def input():
	return stdin.readline()[:-1]

def intput():
	return int(input())

def sinput():
	return input().split()

def intsput():
	return map(int, sinput())

class RangedList:

	def __init__(self, start, stop, val=0):
		self.shift = 0 - start
		self.start = start
		self.stop = stop
		self.list = [val] * (stop - start)

	def __setitem__(self, key, value):
		self.list[key + self.shift] = value

	def __getitem__(self, key):
		return self.list[key + self.shift]

	def __repr__(self):
		return str(self.list)

	def __iter__(self):
		return iter(self.list)

def dprint(*args, **kwargs):
	if debugging:
		print(*args, **kwargs)
debugging = 0
t = intput()
for _ in range(t):
	(a, b, n, m) = intsput()
	if a + b < n + m:
		print('No')
		continue
	diff = min(abs(a - b), n)
	if a > b:
		a -= diff
	else:
		b -= diff
	dprint('reduced to', a, b, n, m)
	if a != b:
		if min(a, b) >= m:
			print('Yes')
			continue
		else:
			print('No')
			continue
	most = a
	if most >= m:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b, n, m) = [int(x) for x in input().split()]
	if a + b < n + m:
		print('No')
		continue
	if m > 0 and min(a, b) == 0:
		print('No')
		continue
	elif min(a, b) < m:
		print('No')
	else:
		print('Yes')


def solve(vanilla, choc, typeA, typeB):
	if vanilla + choc < typeA + typeB or (typeB > 0 and (vanilla == 0 or choc == 0)):
		return 'No'
	else:
		diff = abs(vanilla - choc)
		minus = max(typeA, diff)
		if vanilla > choc:
			if choc >= typeB:
				return 'Yes'
			else:
				vanilla -= minus
		elif vanilla < choc:
			if vanilla >= typeB:
				return 'Yes'
			else:
				choc -= minus
		if vanilla != choc:
			return 'No'
		elif vanilla >= typeB:
			return 'Yes'
		else:
			return 'No'
for x in range(int(input())):
	(v, c, a, b) = list(map(int, input().split()))
	print(solve(v, c, a, b))


from math import gcd, sqrt
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if m <= min(a, b) and m + n <= a + b:
		print('Yes')
	else:
		print('NO')


t = int(input())
f = 2
s = 2
for _ in range(t):
	n = list(map(int, input().split()))
	if n[0] + n[1] == 0:
		print('NO')
	elif n[0] + n[1] < n[2] + n[3]:
		print('NO')
	elif n[0] > n[1]:
		f = n[1] - n[3]
		if f > 0:
			n[0] = n[0] + f
		s = n[0] - n[2]
		if f >= 0 and s >= 0:
			print('YES')
		else:
			print('NO')
	else:
		f = n[0] - n[3]
		if f > 0:
			n[1] = n[1] + f
		s = n[1] - n[2]
		if f >= 0 and s >= 0:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	(v, c, n, m) = map(int, input().split())
	if v + c < m + n:
		print('NO')
	elif min(v, c) < m:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(v, c, t1, t2) = map(int, input().split())
	if v + c < t1 + t2 or min(v, c) < t2:
		print('NO')
	else:
		print('YES')


import sys

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

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def solve():
	(a, b, n, m) = mints()
	if m > min(a, b):
		return False
	return a + b >= n + m
for i in range(mint()):
	print(['No', 'Yes'][solve()])


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

def lin():
	return list(map(int, stin().split()))

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

def modinv(n, p):
	return pow(n, p - 2, p)

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

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
prime = []

def SieveOfEratosthenes(n):
	global prime
	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
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j
for _ in range(inin()):
	(a, b, n, m) = spin()
	if m <= min(a, b) and n + m <= a + b:
		print('Yes')
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase
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')

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far
from math import *
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m or min(a, b) < m:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(x, y, a, b) = map(int, input().split())
	if x + y < a + b:
		print('NO')
	elif min(x, y) < b:
		print('NO')
	else:
		print('YES')


import sys
from sys import stdin
from collections import deque, Counter
from math import factorial
from itertools import groupby

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

def Neo():
	return list(map(int, input().split()))
for _ in range(int(input())):
	(a, b, n, m) = neo()
	r = max(a, b)
	z = min(a, b)
	p = r - z
	if a + b < n + m:
		print('NO')
	elif min(a, b) < m:
		print('NO')
	else:
		print('YES')


t = int(input())

def countAns(a, b, n, m):
	if a + b < n + m:
		return 'No'
	return 'Yes' if min(a, b) >= m else 'No'
for _ in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	print(countAns(a, b, n, m))


from math import ceil
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if m <= min(a, b) and a + b >= n + m:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b, n, m) = [*map(int, input().split())]
	if a + b < n + m:
		print('NO')
	elif a < m or b < m:
		print('No')
	elif a == 0 and b == 0 and (n != 0 or m != 0):
		print('NO')
	elif a < b:
		if a >= m:
			print('YES')
		else:
			print('NO')
	elif a > b:
		if b >= m:
			print('YES')
		else:
			print('NO')
	elif a == b:
		if a - 1 >= m - 1:
			print('YES')
		else:
			print('NO')


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def solve():
	(a, b, n, m) = li()
	if a + b < n + m:
		print('NO')
	elif m > min(a, b):
		print('NO')
	else:
		print('YES')
for _ in range(I()):
	solve()


import sys
input = lambda : sys.stdin.readline().strip('\r\n')
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b >= n + m:
		if min(a, b) < m:
			print('No')
		else:
			print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b, n, m) = [int(c) for c in input().split()]
	if a == 0 and b == 0:
		print('No')
		continue
	if a + b < n + m:
		print('No')
		continue
	if min(a, b) < m:
		print('No')
		continue
	print('Yes')


from sys import stdin
for _ in range(int(stdin.readline())):
	(v, c, first, second) = list(map(int, stdin.readline().split()))
	if v + c >= first + second and min(v, c) >= second:
		print('Yes')
	else:
		print('No')


for _ in ' ' * int(input()):
	(a, b, n, m) = map(int, input().split())
	print('No' if a + b < n + m or min(a, b) < m else 'Yes')


t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	f = 0
	if a + b < n + m:
		f = 1
	elif min(a, b) < m:
		f = 1
	else:
		f = 0
	if f:
		print('NO')
	else:
		print('YES')


import sys
import math
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
t = inp()
for _ in range(t):
	(a, b, n, m) = invr()
	if a + b < n + m or min(a, b) < m:
		print('NO')
	else:
		print('YES')


from sys import stdin, stdout
from collections import Counter

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

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

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
from math import ceil
for i in range(ip()):
	(a, b, m, n) = ei()
	if a + b < m + n:
		print('No')
		continue
	elif n <= min(a, b):
		print('Yes')
	else:
		print('No')


def solve():
	(a, b, n, m) = map(int, input().split())
	if n - a + m - b > 0 or min(a, b) < m:
		print('No')
	else:
		dif = min(n, max(a, b) - min(a, b))
		n -= dif
		if a + b >= n + m:
			print('Yes')
		else:
			print('No')
for i in range(int(input())):
	solve()


import sys
input = sys.stdin.readline
import heapq
import copy
import math
import decimal

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

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

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

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

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

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	mod = 1000000007
	limit = 10 ** 18
	ans = 0
	for test in range(tests):
		[a, b, n, m] = inlt()
		if min(a, b) >= m and a + b - m >= n:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
for i in range(1, t + 1):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('no')
	elif n < abs(b - a) and m > min(a, b):
		print('no')
	elif m > min(a, b):
		print('no')
	else:
		print('yes')


num = int(input())
for i in range(num):
	(a, b, n, m) = map(int, input().split())
	flg = 0
	if a > b:
		b = b - m
		if b < 0:
			flg = -1
	else:
		a = a - m
		if a < 0:
			flg = -1
	sm = a + b
	if a + b < n:
		flg = -1
	if flg == -1:
		print('No')
	else:
		print('Yes')


nb_cases = int(input())
for case in range(nb_cases):
	(a, b, n, m) = [int(x) for x in input().split()]
	if a + b < n + m:
		print('No')
		continue
	if m > min(a, b):
		print('No')
		continue
	else:
		print('Yes')


t = int(input())
while t:
	t += -1
	(a, b, n, m) = map(int, input().split())
	mx = max(a, b)
	mn = min(a, b)
	if m > mn:
		print('No')
	else:
		mn -= m
		if n > mx + mn:
			print('No')
		else:
			print('Yes')


def solve(a, b, n, m):
	if n + m > a + b:
		return 'NO'
	elif min(a, b) >= m:
		return 'YES'
	elif min(a, b) < m:
		return 'NO'
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	print(solve(a, b, n, m))


T = int(input())
while T > 0:
	(a, b, m, n) = map(int, input().split())
	if a + b < m + n:
		print('No')
	elif a > b:
		if b >= n:
			print('Yes')
		else:
			print('No')
	elif a >= n:
		print('Yes')
	else:
		print('No')
	T -= 1


t = int(input())
while t:
	t -= 1
	arr = list(map(int, input().split()))
	(v, c, a, b) = (arr[0], arr[1], arr[2], arr[3])
	if v + c < a + b:
		print('No')
	elif min(v, c) < arr[3]:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(a, b, n, m) = tuple(map(int, input().split()))
	if a + b < m + n:
		print('No')
	elif min(a, b) >= m:
		print('Yes')
	else:
		print('No')


def Cookies(v, c, n, m):
	if c < v:
		c -= m
		m = 0
	else:
		v -= m
		m = 0
	if c >= 0 and v >= 0 and (c + v >= n):
		return 'Yes'
	else:
		return 'No'
t = int(input())
for i in range(t):
	s = input()
	(a, b, n, m) = (int(s.split()[0]), int(s.split()[1]), int(s.split()[2]), int(s.split()[3]))
	print(Cookies(a, b, n, m))


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	check = False
	if a >= m and a <= b and (a + b - m >= n) or ((b >= m and a > b) and a + b - m >= n):
		check = True
	if check:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(v, c, f, s) = map(int, input().split())
	if f + s <= v + c:
		if v >= c:
			if c >= s:
				print('Yes')
			else:
				print('No')
		elif v >= s:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	(a, b) = (max(a, b), min(a, b))
	if a + b < n + m:
		print('No')
	elif n >= a:
		print('Yes')
	elif m > b:
		if n - a <= m and m - a + n > a + b:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


from sys import stdin, stdout
from sys import maxsize

def solve():
	pass
test = 1
test = int(input())
for t in range(0, test):
	(a, b, n, m) = list(map(int, input().split()))
	(b1, b2) = (False, False)
	(c, d, e, f) = (a, b, n, m)
	if a > b:
		val = min(n, a - b)
		a -= val
		n -= val
	if b > a:
		val = min(n, b - a)
		b -= val
		n -= val
	if n > 0:
		a -= n // 2
		b -= n // 2
		b -= n % 2
	if a <= b:
		a -= m
	else:
		b -= m
	if a >= 0 and b >= 0:
		b1 = True
	(a, b, n, m) = (c, d, e, f)
	if a <= b:
		a -= m
	if b < a:
		b -= m
	if a >= 0 and b >= 0 and (n <= a + b):
		b2 = True
	if b1 or b2:
		print('Yes')
	else:
		print('No')
	ans = solve()


ll = lambda : map(int, input().split())
t = lambda : int(input())
ss = lambda : input()
lx = lambda x: map(int, input().split(x))
yy = lambda : print('YES')
nn = lambda : print('NO')
from math import log10, log2, ceil, factorial as fac, gcd, inf
for _ in range(t()):
	(a, b, n, m) = ll()
	if a + b >= n + m and m <= min(a, b):
		yy()
	else:
		nn()


for ii in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if m + n > a + b:
		print('No')
	else:
		x = min(a, b)
		y = max(a, b)
		if x < m:
			print('No')
		else:
			x -= m
			if x + y >= n:
				print('Yes')
			else:
				print('No')


from sys import stdout, stdin
import io
import os
input = stdin.readline
for t in range(int(input())):
	(a, c, n, m) = map(int, input().split())
	if a + c < n + m:
		print('No')
	elif a > c:
		if c >= m or (a - n >= m and a - n < c):
			print('Yes')
		else:
			print('No')
	elif a >= m or (c - n >= m and a > c - n):
		print('Yes')
	else:
		print('No')


import math

def read():
	return int(input())

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

def solve():
	(a, b, n, m) = reads()
	print('Yes' if min(a, b) >= m and a + b >= n + m else 'No')
test_num = int(input())
while test_num:
	solve()
	test_num -= 1


from math import *
from bisect import bisect_left as bl
from bisect import bisect_right as br
from collections import Counter as ctr
from collections import deque as dq
from array import array
from re import search
inp = lambda : int(input())
li = lambda : list(map(int, input().split()))
ls = lambda : list(input())
arr = lambda a: array('i', a)
bi = lambda n: bin(n).replace('0b', '')
yn = lambda f: print('NYOE S'[f::2])
sbstr = lambda a, s: search('.*'.join(a), s)

def solve():
	for _ in range(inp()):
		(a, b, n, m) = li()
		if a + b >= n + m and min(a, b) >= m:
			print('Yes')
		else:
			print('No')
solve()


def solve():
	(a, b, n, m) = map(int, input().split())
	mab = min(a, b)
	if mab < m:
		print('NO')
		return
	if a + b < n + m:
		print('NO')
		return
	print('YES')
for i in range(int(input())):
	solve()


for test in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m or min(a, b) < m:
		print('NO')
	else:
		print('YES')


N = int(input())
for x in range(N):
	(a, b, p, m) = map(int, input().split())
	(a, b) = (max(a, b), min(a, b))
	flag = 0
	if m <= b:
		if p <= a + b - m:
			flag = 1
	if flag == 1:
		print('Yes')
	else:
		print('No')


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

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

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

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

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

def cdiv(n, k):
	return n // k + (n % k != 0)

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

def main():
	for _ in range(ii()):
		(a, b, n, m) = mi()
		if a + b < m + n:
			print('No')
			continue
		elif min(a, b) == 0 and m != 0:
			print('No')
		elif min(max(a, b) - n, min(a, b)) < m and min(a, b) < m:
			print('No')
		else:
			print('Yes')
main()


def judge(a, b, n, m):
	if a + b < n + m:
		return False
	if a > b:
		return m <= b
	else:
		return a >= m
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if judge(a, b, n, m):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	x = min(v, c)
	y = max(v, c)
	if v == 0 and m != 0:
		print('NO')
	elif c == 0 and m != 0:
		print('No')
	elif v + c < n + m:
		print('NO')
	elif min(v, c) < m:
		print('NO')
	else:
		print('YES')


from collections import Counter
import string
import math
import sys
from fractions import Fraction

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))

def printDivisors(n):
	divisors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				divisors.append(i)
			else:
				divisors.extend((i, n // i))
		i = i + 1
	return divisors

def countTotalBits(num):
	binary = bin(num)[2:]
	return len(binary)

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

def ncr(n, r):
	if n < r:
		return 0
	numer = fact[n]
	denm = fact[n - r] * fact[r]
	return numer * pow(denm, mod - 2, mod)
for _ in range(vary(1)):
	(a, b, n, m) = vary(4)
	if a + b < n + m:
		print('No')
		continue
	if m > min(a, b):
		print('No')
		continue
	print('Yes')


import math
import bisect
import sys
from collections import OrderedDict
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())
T = inp()
for t in range(T):
	(a, b, n, m) = invr()
	if a + b < n + m:
		print('No')
	elif min(a, b) == 0 and m > 0:
		print('No')
	else:
		a1 = max(a, b)
		a2 = min(a, b)
		diff = a1 - a2
		n -= diff
		if a2 >= m:
			print('Yes')
		else:
			print('No')


from fractions import Fraction
import bisect
import os
import io
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
from queue import Queue

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

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
t = 1
t = iinput()
for _ in range(t):
	(a, b, n, m) = rinput()
	flg = True
	mini = min(a, b)
	if mini < m:
		flg = False
	if a + b - m < n:
		flg = False
	print(['NO', 'YES'][flg])


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	mini = min(a, b)
	maxi = max(a, b)
	mini -= m
	if mini + maxi >= n and mini >= 0:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	(a, b, c, d) = [int(i) for i in input().split()]
	mini = min(a, b)
	if d <= mini and a + b >= c + d:
		print('yes')
	else:
		print('no')
	t -= 1


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('NO')
	elif m == 0:
		print('YES')
	else:
		small = min(a, b)
		if small < m:
			print('NO')
		else:
			print('YES')


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from collections import Counter as cc
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

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
import sys
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('NO')
		continue
	z = min(a, b)
	if z >= m:
		print('YES')
	else:
		print('NO')


import math, bisect, collections, itertools, datetime, functools, sys, os
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for testcase in range(int(input())):
	(v, c, first, second) = map(int, input().split())
	if v + c < first + second:
		print('NO')
	elif c < v:
		if second <= c:
			print('YES')
		else:
			print('NO')
	elif second <= v:
		print('YES')
	else:
		print('NO')


from sys import stdout
from collections import defaultdict
import math
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	if a < m:
		print('No')
		continue
	if a + b < n + m:
		print('No')
		continue
	print('Yes')


try:
	k = int(input())
	for i in range(k):
		a = list(map(int, input().split()))
		if a[2] + a[3] > a[0] + a[1]:
			print('NO')
		elif a[3] <= min(a[0], a[1]):
			print('YES')
		else:
			print('NO')
except Exception:
	pass


import sys
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('NO')
	else:
		l = min(a, b)
		if m > l:
			print('NO')
		else:
			print('YES')


import sys
input = sys.stdin.readline
LI = lambda : list(map(int, input().split()))
MI = lambda : map(int, input().split())
for _ in range(int(input())):
	(v, c, n, m) = MI()
	print('YES' if v + c >= n + m and m <= min(v, c) else 'NO')


import os
import operator
from collections import defaultdict
import sys
from io import BytesIO, IOBase
import bisect

def inar():
	return [int(el) for el in input().split()]

def main():
	for _ in range(int(input())):
		(a, b, n, m) = map(int, input().split())
		if a + b < n + m:
			print('No')
		elif a <= b:
			if a >= m:
				print('Yes')
			else:
				print('No')
		elif b >= m:
			print('Yes')
		else:
			print('No')
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()


from sys import stdin, stdout

def input():
	return stdin.readline()

def prit():
	return stdout.write(str(x) + '\n')
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
	elif a <= b:
		if a >= m:
			print('Yes')
		else:
			print('No')
	elif b >= m:
		print('Yes')
	else:
		print('No')


z = int(input())
for h in range(z):
	(a, b, n, m) = map(int, input().split())
	x = min(a, b)
	y = max(a, b)
	flag1 = 0
	flag2 = 0
	if m <= x:
		flag1 = 1
		z = x - m
		if z + y >= n:
			flag2 = 1
		if flag1 == 1 and flag2 == 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for q in range(t):
	(a, b, n, m) = [int(i) for i in input().split(' ')]
	if b <= a:
		b_l_a = b
		a_l_b = a
	else:
		b_l_a = a
		a_l_b = b
	if b_l_a >= m:
		if a_l_b + b_l_a - m >= n:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


import os
import sys
debug = True
if debug and os.path.exists('input.in'):
	input = open('input.in', 'r').readline
else:
	debug = False
	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())
test_count = inp()
for t in range(test_count):
	if debug:
		print('Test Case #', t + 1)
	(a, b, n, m) = invr()
	if a + b >= n + m and min(a, b) >= m:
		print('Yes')
	else:
		print('No')


from collections import defaultdict as dd
from collections import Counter
from math import log, ceil

def solve():
	(a, b, n, m) = list(map(int, input().split()))
	if min(a, b) < m:
		print('NO')
		return
	if a < b:
		a -= m
	else:
		b -= m
	if n > max(a, b):
		n -= a + b
		if n > 0:
			print('NO')
			return
		else:
			print('YES')
			return
	print('YES')
t = 1
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for x in range(t):
	(v, c, a, b) = map(int, input().split())
	if v + c < a + b:
		print('No')
	elif min(v, c) < b:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	l = [20 for i in range(30)]
	k = 1000
	mene = 10001
	if n + m > v + c:
		print('No')
	else:
		l = [0 for i in range(3)]
		ans = min(v, c)
		if m > ans:
			print('No')
		else:
			print('Yes')


import math
t = int(input())
while t:
	t -= 1
	(a, b, n, m) = [int(x) for x in input().split()]
	(a, b) = (min(a, b), max(a, b))
	if m > a:
		print('No')
	else:
		a -= m
		if n > a + b:
			print('No')
		else:
			print('Yes')


t = int(input())
while t:
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
	else:
		mini = min(a, b)
		maxi = max(a, b)
		if mini >= m:
			print('Yes')
		else:
			print('No')
	t = t - 1


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	mi = min(a, b)
	ma = max(a, b)
	if a + b < c + d:
		print('No')
	elif mi >= d and ma + (mi - d) >= c:
		print('Yes')
	else:
		print('No')


def main():
	n = int(input())
	for i in range(n):
		solve()

def solve():
	(a, b, n, m) = list(map(int, input().split(' ')))
	if m + n > a + b or m > min(a, b):
		print('No')
		return
	print('Yes')
main()


t = int(input())
for i in range(t):
	l = [int(i) for i in input().split()]
	a = l[0]
	b = l[1]
	n = l[2]
	m = l[3]
	if a + b >= n + m:
		if m <= min(a, b):
			print('Yes')
		elif m > min(a, b):
			print('No')
		else:
			print('Yes')
	else:
		print('No')


def main(a, b, n, m):
	if a < b:
		(a, b) = (b, a)
	if m > b:
		flag = False
	elif a + b < n + m:
		flag = False
	else:
		flag = True
	return flag
t = int(input())
for i in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	re = main(a, b, n, m)
	if re:
		print('Yes')
	else:
		print('No')


def testcase():
	import sys
	input = sys.stdin.readline
	(a, b, n, m) = [int(x) for x in input().strip().split()]
	if a + b < n + m:
		print('No')
		return
	if a <= b:
		if a < m:
			print('No')
		else:
			print('Yes')
	elif b < m:
		print('No')
	else:
		print('Yes')

def main():
	import sys
	input = sys.stdin.readline
	t = int(input())
	for _ in range(t):
		testcase()
main()


import os
from sys import stdin, stdout

def solve(tc):
	(a, b, n, m) = map(int, stdin.readline().split())
	ans = True
	big = max(a, b)
	small = min(a, b)
	if small < m:
		print('No')
		return
	small -= m
	diff = big - small
	if n <= diff:
		print('Yes')
	else:
		n -= diff
		if n > small * 2:
			print('No')
		else:
			print('Yes')
tcs = int(stdin.readline().strip())
tc = 1
while tc <= tcs:
	solve(tc)
	tc += 1


import math
import sys
imput = sys.stdin.readline
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if min(a, b) >= m and a + b >= m + n:
		print('YES')
	else:
		print('NO')


import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

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

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

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

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def ng(a, b, n, m):
	if a + b < n + m:
		return True
	if min(a, b) < m:
		return True
	return False
for _ in range(II()):
	(a, b, n, m) = MI()
	if ng(a, b, n, m):
		print('No')
	else:
		print('Yes')


t = int(input())
resposta = []
for k in range(t):
	(v, c, n, m) = map(str, input().split())
	v = int(v)
	c = int(c)
	n = int(n)
	m = int(m)
	if v + c < n + m:
		resposta.append('NO')
	else:
		minn = min(n, m, v, c)
		v = v - minn
		c = c - minn
		n = n - minn
		m = m - minn
		if v == 0 and n <= c and (m == 0) or (c == 0 and n <= v and (m == 0)) or (m == 0 and v + c >= n) or (n == 0 and min(v, c) >= m):
			resposta.append('YES')
		else:
			resposta.append('NO')
for i in range(t):
	print(resposta[i])


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	s = True
	h = min(a, b)
	y = max(n, m)
	left = h - m
	if left < 0:
		s = False
	elif n + m > a + b:
		s = False
	else:
		s = True
	if s == False:
		print('No')
	else:
		print('Yes')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
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 main():
	t = I()
	rr = []
	for _ in range(t):
		(a, b, n, m) = LI()
		r = True
		t = abs(a - b)
		if a + b < n + m:
			r = False
		elif t > n:
			r = min(a, b) >= m
		else:
			n -= t
			c = min(a, b)
			t = min(n, m)
			c -= t
			m -= t
			r = c >= m
		rr.append(IF(r, 'Yes', 'No'))
	return JA(rr, '\n')
print(main())


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import sqrt, ceil, factorial, inf
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from decimal import Decimal
from fractions import Fraction
mod = pow(10, 9) + 7
mod2 = 998244353

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

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(int(data())):
	(a, b, n, m) = sp()
	if a + b < n + m:
		out('NO')
		continue
	if b >= m and a >= m:
		out('YES')
		continue
	out('NO')


import sys
readline = sys.stdin.readline
t = int(readline())
for _ in range(t):
	(a, b, n, m) = map(int, readline().split())
	if a + b < m + n or min(a, b) < m:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	(a, b, j, k) = map(int, input().split())
	ans = 'Yes'
	if a + b < j + k:
		ans = 'No'
	elif min(a, b) < k:
		ans = 'No'
	print(ans)


for i in range(int(input())):
	(v, c, n, m) = list(map(int, input().split()))
	if v + c >= n + m and m <= min(v, c):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	if v + c < n + m:
		print('No')
	elif m > 0 and min(v, c) == 0:
		print('No')
	elif min(v, c) < m and max(v, c) - n >= min(v, c):
		print('No')
	elif min(v, c) >= m:
		print('Yes')
	else:
		print('No')


a = int(input())
for i in range(a):
	(a, c, good, bad) = map(int, input().split())
	if a + c < good + bad:
		print('No')
		continue
	if bad == 0:
		print('Yes')
		continue
	if bad <= good:
		if bad > min(a, c):
			print('No')
		else:
			print('Yes')
	else:
		bad -= good
		a -= good
		c -= good
		r = min(a, c)
		if r < bad:
			print('No')
		else:
			print('Yes')


t = int(input())
while t:
	t -= 1
	(a, b, n, m) = input().split()
	a = int(a)
	b = int(b)
	n = int(n)
	m = int(m)
	if min(a, b) >= m and a + b >= n + m:
		print('YES')
	else:
		print('NO')


from math import *
t = int(input())
while t > 0:
	ip = [int(x) for x in input().split()]
	a = ip[0]
	b = ip[1]
	n = ip[2]
	m = ip[3]
	if n + m <= a + b and min(a, b) >= m:
		print('Yes')
	else:
		print('No')
	t -= 1


import sys
import heapq
import random
import collections
import bisect

def solve(a, b, x, y):
	if a + b < x + y:
		return 'No'
	(a, b) = sorted([a, b])
	if a < y:
		return 'No'
	return 'Yes'

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	return
for case_num in range(int(input())):
	(a, b, x, y) = list(map(int, input().split()))
	res = solve(a, b, x, y)
	print(res)


elem = int(input())
for i in range(elem):
	ar = []
	for i in input().split(' '):
		ar.append(int(i))
	a = ar[0]
	b = ar[1]
	n = ar[2]
	m = ar[3]
	if a + b < n + m:
		print('No')
	elif min(a, b) < m:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(a, b, n, m) = I()
	f = 0
	if a + b < n + m:
		f = 1
	if min(a, b) < m:
		f = 1
	print('YNeos'[f::2])


z = input
from math import ceil, log, gcd, sqrt
n = int(z())
for i in range(n):
	(v, c, n, m) = list(map(int, z().split()))
	if m <= min(v, c) and v + c >= m + n:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(a, b, n, m) = [int(x) for x in input().split()]
	(a, b) = (max(b, a), min(b, a))
	b -= m
	if b < 0:
		print('No')
	else:
		a += b
		a -= n
		if a < 0:
			print('No')
		else:
			print('Yes')


import io, os
from collections import deque
RL = lambda : list(map(int, input().split(' ')))
T = int(input())
for _ in range(T):
	(a, b, n, m) = RL()
	if a + b >= n + m:
		if min(a, b) >= m:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


T = int(input())
for _ in range(T):
	(a, b, n, m) = map(int, input().split())
	mini = min(a, b)
	if m <= mini and a + b >= n + m:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	arr = list(map(int, input().strip().split(' ')))
	a = arr[0]
	b = arr[1]
	n = arr[2]
	m = arr[3]
	fin = ''
	if a + b < n + m:
		fin = 'NO'
	elif min(a, b) >= m:
		fin = 'YES'
	else:
		fin = 'NO'
	print(fin)


for tests in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m or min(a, b) < m:
		print('no')
	else:
		print('yes')


import sys
input = sys.stdin.readline
ins = lambda : input().rstrip()
ini = lambda : int(input().rstrip())
inm = lambda : map(int, input().split())
inl = lambda : list(map(int, input().split()))
out = lambda x: print('\n'.join(x))
t = ini()
ans = []
for _ in range(t):
	(a, b, n, m) = inm()
	ans.append('Yes' if m <= min(a, b) and n + m <= a + b else 'No')
out(ans)


n = eval(input())
for i in range(n):
	tem = input().split()
	(a, b, n, m) = (int(tem[0]), int(tem[1]), int(tem[2]), int(tem[3]))
	if m <= min(a, b) and a + b >= n + m:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
INF = 100000000000.0

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

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

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

def get_string():
	return stdin.readline().strip()
from collections import defaultdict
for _ in range(int(stdin.readline())):
	(a, b, n, m) = get_ints()
	if a + b < n + m:
		print('NO')
	elif min(a, b) < m:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	ok = True
	if a > b and b < m:
		ok = False
	if a <= b and a < m:
		ok = False
	if a + b < m + n:
		ok = False
	print('No' if ok == False else 'Yes')


t = int(input())
for i in range(t):
	(v, c, n, m) = [int(x) for x in input().split()]
	if v + c < n + m:
		print('No')
	else:
		while n > 0 and m > 0:
			if v == c:
				r = min(m, n)
				v -= r
				c -= r
				n -= r
				m -= r
			elif v > c:
				r = min(v - c, n)
				v -= r
				n -= r
			else:
				r = min(c - v, n)
				c -= r
				n -= r
		if n == 0:
			if m <= min(v, c):
				print('Yes')
			else:
				print('No')
		elif n <= v + c:
			print('Yes')
		else:
			print('No')


t = int(input())
while t:
	t -= 1
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	if min(a, b) < m:
		print('No')
		continue
	print('Yes')


def func(a, b, n, m):
	if a + b < m + n:
		return 'No'
	if min(a, b) < m:
		return 'No'
	return 'Yes'
for t in range(int(input())):
	(a, b, n, m) = [int(x) for x in input().split()]
	print(func(a, b, n, m))


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

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

def main():
	(a, b, n, m) = mpint()
	if a + b < n + m:
		return False
	if min(a, b) < m:
		if a < b:
			new_b = max(a, b - n)
			n -= b - new_b
		elif a > b:
			new_a = max(b, a - n)
			n -= a - new_a
	if n < m:
		a -= n
		b -= n
		(n, m) = (0, m - n)
	else:
		a -= m
		b -= m
		(n, m) = (n - m, 0)
	return min(a, b) >= m
for case in range(itg()):
	print('Yes' if main() else 'No')


t = int(input())
for i in range(t):
	abnm = list(map(int, input().split()))
	a = abnm[0]
	b = abnm[1]
	n = abnm[2]
	m = abnm[3]
	if a + b < n + m:
		print('NO')
	elif a > b:
		if b >= m:
			b -= m
			if a + b >= n:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
	elif b >= a:
		if a >= m:
			a -= m
			if a + b >= n:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')


t = int(input())
while t:
	q = list(map(int, input().split()))
	(a, b, n, m) = (q[0], q[1], q[2], q[3])
	if a > b:
		v = b
		g = a
	else:
		v = a
		g = b
	if a >= n and a >= m and (b >= n) and (b >= m):
		print('Yes')
	elif a + b < n + m:
		print('No')
	elif v < m:
		print('No')
	else:
		print('Yes')
	t -= 1


for i in range(int(input())):
	(x, y, n, m) = map(int, input().split())
	if min(x, y) >= m and x + y >= n + m:
		print('Yes')
	else:
		print('No')


tests = int(input())
for _ in range(tests):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	f = min(a, b, n, m)
	a -= f
	b -= f
	n -= f
	m -= f
	flag = False
	if a == 0:
		if m != 0:
			flag = False
		elif b < n:
			flag = False
		else:
			flag = True
	if b == 0 and (not flag):
		if m != 0:
			flag = False
		elif a < n:
			flag = False
		else:
			flag = True
	if n == 0 and (not flag):
		if m > min(a, b):
			flag = False
		else:
			flag = True
	if m == 0 and (not flag):
		if n > a + b:
			flag = False
		else:
			flag = True
	if flag:
		print('Yes')
	else:
		print('No')


s = []
for iii in range(int(input())):
	(v, c, t1, t2) = map(int, input().split())
	if t2 > min(v, c):
		s.append('no')
		continue
	if c <= v:
		c -= t2
	else:
		v -= t2
	if t1 <= v + c:
		s.append('yes')
	else:
		s.append('no')
for i in s:
	print(i)


def solu(a, b, n, m):
	v = 0
	c = 0
	if a > b:
		v = a
		c = b
	else:
		v = b
		c = a
	if v + c < n + m:
		return False
	if m > c:
		return False
	return True
nt = int(input())
for i in range(nt):
	arr = input().split(' ')
	if solu(int(arr[0]), int(arr[1]), int(arr[2]), int(arr[3])):
		print('Yes')
	else:
		print('No')


for p in range(int(input())):
	(a, b, n, m) = input().split()
	a = int(a)
	b = int(b)
	n = int(n)
	m = int(m)
	if a + b < n + m:
		print('No')
	elif b < a:
		if m > b:
			print('No')
		else:
			print('Yes')
	elif m > a:
		print('No')
	else:
		print('Yes')


import sys
import bisect as b
import math
from collections import defaultdict as dd
input = sys.stdin.readline
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def pref(a, n, f):
	pre = [0] * n
	if f == 0:
		pre[0] = a[0]
		for i in range(1, n):
			pre[i] = a[i] + pre[i - 1]
	else:
		pre[-1] = a[-1]
		for i in range(n - 2, -1, -1):
			pre[i] = pre[i + 1] + a[i]
	return pre
maxint = 10 ** 24

def kadane(a, size):
	max_so_far = -maxint - 1
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far
for _ in range(inin()):
	(a, b, n, m) = cin()
	if a + b < n + m or m > min(a, b):
		print('NO')
	else:
		print('YES')


rr = lambda : input().strip()
rrm = lambda : map(int, rr().split())

def mi(v, c):
	if v <= c:
		return v
	else:
		return c

def solve():
	(v, c, t1, t2) = rrm()
	tC = v + c
	tP = t1 + t2
	if tC < tP or t2 > mi(v, c):
		return 'No'
	return 'Yes'
T = int(rr())
for _ in range(T):
	ans = solve()
	print(ans)


from __future__ import division, print_function
import sys
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
if os.path.exists('out.txt'):
	sys.stdout = open('out.txt', 'w')

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

def mapi(arg=0):
	return map(int if arg == 0 else str, input().split())
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	if min(a, b) < m:
		print('No')
	else:
		print('Yes')


import math
import collections
import sys

def inpu():
	return input().split(' ')

def inti(a):
	for i in range(len(a)):
		a[i] = int(a[i])
	return a

def inp():
	a = inpu()
	a = inti(a)
	return a
for _ in range(int(input())):
	x = inp()
	(v, c, n, m) = (x[0], x[1], x[2], x[3])
	if v + c < n + m:
		print('No')
		continue
	if v > c:
		if c >= m:
			print('Yes')
		else:
			print('No')
	elif v >= m:
		print('Yes')
	else:
		print('No')


T = int(input())
while T > 0:
	raw = input().split()
	(a, b, n, m) = (int(raw[0]), int(raw[1]), int(raw[2]), int(raw[3]))
	less = min(a, b)
	if a + b < n + m:
		print('No')
	elif less >= m:
		print('Yes')
	else:
		print('No')
	T = T - 1


test = int(input())
while test:
	test -= 1
	(v, c, a, b) = input().split()
	(v, c, a, b) = (int(v), int(c), int(a), int(b))
	if a + b > v + c:
		print('No')
	else:
		if v > c:
			c -= b
		else:
			v -= b
		if v < 0 or c < 0:
			print('No')
		else:
			x = abs(v - c)
			if x >= a:
				if v > c:
					v = v - a
				else:
					c = c - a
				a = 0
			else:
				if v > c:
					v = v - x
				else:
					c = c - x
				a = a - x
				v -= a // 2
				c -= (a + 1) // 2
			if v < 0 or c < 0:
				print('No')
			else:
				print('Yes')


import sys

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

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

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	mi = min(a, b)
	ma = max(a, b)
	if a + b < n + m:
		print('No')
		continue
	if m > mi:
		print('No')
		continue
	else:
		if m == 0:
			if a + b >= n:
				print('Yes')
			else:
				print('No')
			continue
		if mi - m + ma >= n:
			print('Yes')
		else:
			print('No')


for i in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if min(a, b) >= m and a + b - m >= n:
		print('Yes')
	elif n < abs(a - b):
		print('No')
	elif a == 0 or b == 0:
		print('No')
	else:
		print('No')


def solve(a, b, n, m):
	if a + b < n + m:
		return 'No'
	if min(a, b) < m:
		return 'No'
	return 'Yes'
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	print(solve(a, b, n, m))


N = int(input())
i = 0
while i < N:
	l = list(map(int, input().split()))
	(a, b, n, m) = (l[0], l[1], l[2], l[3])
	if n + m <= a + b and m <= min(a, b):
		print('Yes')
	else:
		print('No')
	i += 1


from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

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

def si():
	return input()

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

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')

def solve():
	for _ in range(ii()):
		(a, b, n, m) = mi()
		mx = max(a, b)
		mnx = min(a, b)
		if mx >= n and mnx >= m:
			print('Yes')
		elif mnx >= m and mx + mnx >= n + m:
			print('Yes')
		else:
			print('No')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output1.txt', 'w')
else:
	input = sys.stdin.readline
solve()


for _ in range(int(input())):
	(a, b, n, m) = [int(x) for x in input().split()]
	if a > b:
		(a, b) = (b, a)
	print(['Yes', 'No'][a < m or a + b < n + m])


t = int(input())
for _ in range(t):
	arr = [int(p) for p in input().split()]
	(a, b, n, m) = arr
	if a + b < m + n:
		print('No')
		continue
	elif min(a, b) < m:
		print('No')
		continue
	else:
		print('Yes')


for i in [*open(0)][1:]:
	(a, b, n, m) = map(int, i.split())
	ans = max(a, b) - min(a, b)
	a = min(a, b)
	n = 0 if n < ans else n - ans
	if a < m:
		print('NO')
	elif a + a >= m + n:
		print('YES')
	else:
		print('NO')


def solve():
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		return
	if min(a, b) >= max(n, m):
		print('Yes')
		return
	if min(a, b) < m:
		print('No')
		return
	print('Yes')
for i in range(int(input())):
	solve()


def solve(a, b, n, m):
	if n + m > a + b:
		return 'No'
	if m > min(a, b):
		return 'No'
	return 'Yes'
t = int(input())
for i_t in range(t):
	current_str = input().split(' ')
	a = int(current_str[0])
	b = int(current_str[1])
	n = int(current_str[2])
	m = int(current_str[3])
	print(solve(a, b, n, m))


t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	(a, b, n, m) = [int(i) for i in input().split()]
	if a + b < n + m:
		print('No')
	elif min(a, b) >= m:
		print('Yes')
	else:
		print('No')


def is_poss(a, b, n, m):
	if a + b < m + n:
		return False
	if min(a, b) >= m:
		return True
	return False

def main():
	t = int(input())
	for _ in range(t):
		(a, b, n, m) = map(int, input().split())
		if is_poss(a, b, n, m):
			print('YES')
		else:
			print('NO')
main()


from bisect import insort_right, insort_left, bisect_left, bisect_right
from heapq import heapify, heappop, heappush
t = int(input())
while t:
	t -= 1
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	if m > min(a, b):
		print('No')
		continue
	print('Yes')


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	copya = a
	copyb = b
	copyn = n
	copym = m
	if copya > copyb:
		t = min(copyn, copya - copyb)
		copyn -= t
		copya -= t
	else:
		t = min(copyn, copyb - copya)
		copyn -= t
		copyb -= t
	copya -= copyn // 2
	copyb -= copyn - copyn // 2
	copyn = 0
	if copya > copyb:
		t = min(copym, copyb)
		copym -= t
		copyb -= t
	else:
		t = min(copym, copya)
		copym -= t
		copya -= t
	if copym == 0 and copya >= 0 and (copyb >= 0):
		print('YES')
	else:
		copya = a
		copyb = b
		copyn = n
		copym = m
		if copya > copyb:
			t = min(copym, copyb)
			copym -= t
			copyb -= t
		else:
			t = min(copym, copya)
			copym -= t
			copya -= t
		if copya > copyb:
			t = min(copyn, copya - copyb)
			copyn -= t
			copya -= t
		else:
			t = min(copyn, copyb - copya)
			copyn -= t
			copyb -= t
		copya -= copyn // 2
		copyb -= copyn - copyn // 2
		copyn = 0
		if copym == 0 and copya >= 0 and (copyb >= 0):
			print('YES')
		else:
			print('NO')


for t in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	l = min(a, b, n, m)
	a -= l
	b -= l
	n -= l
	m -= l
	if m != 0 and m > min(a, b) or a + b < n:
		print('no')
	else:
		print('yes')


t = int(input())
while t != 0:
	(a, b, n, m) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	if m > min(a, b) or a + b < m + n:
		print('no')
	else:
		print('yes')
	t -= 1


def isValidOrderPresent(a, b, m, n):
	if a + b < m + n:
		return 'NO'
	if a <= b:
		if n > a:
			return 'NO'
	elif n > b:
		return 'NO'
	return 'YES'
t = int(input())
for _ in range(t):
	(a, b, m, n) = map(int, input().split())
	print(isValidOrderPresent(a, b, m, n))


import math

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

def lcm(a, b):
	return a * b / gcd(a, b)

def bs(arr, l, r, x):
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return arr[mid]
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def swap(list, pos1, pos2):
	(list[pos1], list[pos2]) = (list[pos2], list[pos1])
	return list
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if m + n > a + b:
		print('NO')
	elif min(a, b) < m:
		print('NO')
	else:
		print('YES')


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 b == 0:
		return a
	return gcd(b, a % b)

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 and n > 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 and n > 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(10000000.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')
for _ in range(int(input())):
	(v, c, n, m) = int_array()
	if v + c < n + m:
		print('NO')
	elif min(v, c) >= m:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	mn = min(a, b)
	if mn < m:
		print('No')
		continue
	print('Yes')


def fun(v, c, g1, g2):
	if v + c < g1 + g2:
		return 'No'
	if v > c:
		if g2 > c:
			return 'No'
		else:
			return 'Yes'
	elif g2 > v:
		return 'No'
	else:
		return 'Yes'
for _ in range(int(input())):
	(v, c, g1, g2) = map(int, input().split())
	print(fun(v, c, g1, g2))


def read_int():
	return int(input().strip())

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

def solve():
	(a, b, n, m) = read_ints()
	if a + b < n + m:
		return 'No'
	if m > min(a, b):
		return 'No'
	return 'Yes'
T = read_int()
for _ in range(T):
	print(solve())


def task_C():
	t = int(input())
	for _ in range(t):
		(a, b, n, m) = map(int, input().split())
		if a + b == 0 or a + b - n - m < 0 or ((a == 0 or b == 0) and m != 0):
			print('No')
		else:
			min_cookie = min(a, b)
			if min_cookie < m:
				print('No')
			else:
				print('Yes')

def main():
	task_C()
main()


y = int(input())
ans = []
for i in range(y):
	al = input().split()
	e = list(map(int, al))
	a = e[0]
	b = e[1]
	n = e[2]
	m = e[3]
	if a + b < m + n:
		ans.append('No')
	elif m <= min(a, b):
		ans.append('Yes')
	else:
		ans.append('No')
for i in ans:
	print(i)


for x in range(int(input())):
	(a, b, n, m) = list(map(int, input().split()))
	if a <= b and a + b >= n + m and (a >= m):
		print('YES')
	elif a > b and a + b >= n + m and (b >= m):
		print('YES')
	else:
		print('NO')


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	(a, b, n, m) = li()
	ans = 'Yes'
	if a + b < n + m:
		ans = 'No'
	elif a > b:
		if m > b:
			ans = 'No'
	elif m > a:
		ans = 'No'
	print(ans)


import sys
import math as mt
input = sys.stdin.buffer.readline
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	maxi = max(a, b)
	mini = min(a, b)
	if maxi - mini <= n:
		n -= maxi - mini
		maxi = mini
		temp = m
		m -= min(mini, m)
		n -= min(mini, temp)
		mini -= min(mini, temp)
		n -= 2 * mini
		if m <= 0 and n <= 0:
			print('Yes')
		else:
			print('No')
	else:
		temp = n
		m -= mini
		if m <= 0:
			print('Yes')
		else:
			print('No')


t = int(input())
for hatt in range(t):
	lis = input().split()
	(a, b, n, m) = (int(lis[0]), int(lis[1]), int(lis[2]), int(lis[3]))
	mm = min(a, b)
	if m <= mm and a + b >= n + m:
		print('Yes')
	else:
		print('No')


import math
import datetime
import collections
import statistics
import itertools

def is_prime(num):
	for i in range(2, int(math.sqrt(num)) + 1):
		if num % i == 0:
			return False
	return True

def input_list():
	ll = list(map(int, input().split(' ')))
	return ll
tc = int(input())
for _ in range(tc):
	(a, b, n, m) = map(int, input().split())
	if a + b < m + n or m > min(a, b):
		print('No')
	else:
		print('Yes')


testCases = int(input())
for test in range(testCases):
	arr = input().split()
	for i in range(len(arr)):
		arr[i] = int(arr[i])
	v = arr[0]
	c = arr[1]
	f = arr[2]
	s = arr[3]
	if v + c < f + s:
		print('NO')
		continue
	if s <= min(v, c):
		rem = v + c - s
		if f <= rem:
			print('YES')
		else:
			print('NO')
		continue
	if v > c:
		rem = min(v - c, f)
		f = f - rem
		v = v - rem
	if c > v:
		rem = min(c - v, f)
		f = f - rem
		c = c - rem
	if f % 2 == 0:
		c = c - f // 2
		v = v - f // 2
	else:
		c = c - f // 2 + 1
		v = v - f // 2
	minimum = min(c, v)
	if s <= minimum:
		print('YES')
	else:
		print('NO')


import sys
import math
from decimal import *

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

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

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

def solve():
	tt = I()
	for ii in range(tt):
		(a, b, n, m) = IL()
		mleft = min(a, b)
		if a + b < n + m:
			print('No')
			continue
		if m > mleft:
			print('No')
			continue
		nleft = max(a, b)
		nleft += mleft - m
		if n > nleft:
			print('No')
			continue
		print('Yes')
solve()


from sys import stdin, stdout
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()
import math
from collections import Counter, defaultdict
for _ in range(IN()):
	(a, b, n, m) = MAP()
	if a + b < n + m:
		print('NO')
	elif min(a, b) >= m:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	(a, b, c, d) = map(int, input().split())
	m = min(a, b)
	if a + b < c + d:
		print('No')
	elif m >= d:
		print('Yes')
	else:
		print('No')
	t -= 1


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def main():
	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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()
for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	l = [20 for i in range(30)]
	k = 1000
	mene = 10001
	if n + m > v + c:
		print('No')
	else:
		l = [0 for i in range(3)]
		ans = min(v, c)
		if m > ans:
			print('No')
		else:
			print('Yes')


t = int(input())
for _ in range(t):
	(a, b, m, n) = map(int, input().split())
	if a + b < m + n:
		print('No')
		continue
	minimum = min(a, b)
	maximum = max(a, b)
	if minimum >= n:
		if a + b - n >= m:
			print('Yes')
		else:
			print('No')
	elif a == b:
		if a >= n:
			if a + b - n >= m:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
	else:
		print('No')


import math
from collections import deque
import sys
sys.setrecursionlimit(10 ** 4)

def Divisors(n):
	l = []
	i = 2
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
	return l

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

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(i)
			n = n / i
	if n > 2:
		l.append(n)
	return l

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

def maxSubArraySum(a):
	max_so_far = 0
	max_ending_here = 0
	size = len(a)
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < abs(max_ending_here):
			max_so_far = max_ending_here
	return max_so_far

def longestsubarray(arr, n, k):
	current_count = 0
	max_count = 0
	for i in range(0, n, 1):
		if arr[i] % k != 0:
			current_count += 1
		else:
			current_count = 0
		max_count = max(current_count, max_count)
	return max_count

def main():
	(a, b, n, m) = list(map(int, input().split()))
	if a + b < m + n or min(a, b) < m:
		print('NO')
	else:
		print('YES')
t = int(input())
for i in range(0, t):
	main()


for i in range(int(input())):
	(a, b, n, m) = (int(i) for i in input().split())
	print(['No', 'Yes'][min(a, b) >= m and a + b - m >= n])


import math
import sys
import collections
import bisect
from collections import defaultdict
from sys import stdin, stdout
MOD = 10 ** 9 + 7
sys.setrecursionlimit(10 ** 7)

def take_root(num):
	return math.ceil(math.sqrt(num))

def sieve():
	limit = 86028121
	isprime = [1] * 86028122
	isprime[0] = 0
	isprime[1] = 0
	for i in range(2, take_root(limit + 1)):
		if isprime[i] == 1:
			for j in range(i * i, limit + 1, i):
				isprime[j] = 0
	primes = []
	for i in range(limit + 1):
		if isprime[i] == True:
			primes.append(i)
	return primes

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

def iinput():
	return int(input())

def strinput():
	return input()

def linput():
	return list(map(int, input().split()))
for _ in range(iinput()):
	(a, b, n, m) = minput()
	if min(a, b) < m:
		print('No')
		continue
	elif a + b - m < n:
		print('No')
		continue
	print('Yes')


for _ in range(int(input())):
	(a, b, n, m) = [int(i) for i in input().split()]
	if a + b >= m + n and m <= min(a, b):
		print('Yes')
	else:
		print('No')


def main():
	for _ in range(int(input())):
		(v, c, p1, p2) = list(map(int, input().split()))
		print('Yes' if min(v, c) >= p2 and v + c - p2 >= p1 else 'No')
main()


for tc in range(int(input())):
	(a, b, n, m) = input().split(' ')
	(a, b, n, m) = (int(a), int(b), int(n), int(m))
	if a + b < n + m or a < m or b < m:
		print('No')
	else:
		print('Yes')


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	(a, b, n, m) = map(int, sys.stdin.readline().split())
	if min(a, b) < m:
		print('No')
		continue
	total = a + b - m
	if total >= n:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(v, c, good, bad) = map(int, input().split())
	if bad > min(v, c) or good + bad > v + c:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(wanilia, czekolada, n, m) = map(int, input().split())
	if wanilia > czekolada:
		wiecej = wanilia
		mniej = czekolada
	else:
		wiecej = czekolada
		mniej = wanilia
	if wanilia + czekolada < n + m:
		print('No')
		continue
	if m <= mniej:
		print('Yes')
		continue
	print('No')


for _ in range(int(input())):
	(a, b, n1, n2) = [int(i) for i in input().split()]
	min1 = min([a, b])
	max1 = max([a, b])
	r = min1 - n2
	if r <= 0:
		r = 0
	if min1 >= n2 and max1 + r >= n1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(v, c, n, m) = [int(i) for i in input().split()]
	if v + c < n + m:
		print('No')
	else:
		print('Yes') if m <= min(v, c) else print('No')


from sys import stdin, stdout
for query in range(int(stdin.readline())):
	c = stdin.readline().split()
	a = int(c[0])
	b = int(c[1])
	n = int(c[2])
	m = int(c[3])
	if a + b >= n + m and min(a, b) >= m:
		stdout.write('YES\n')
	else:
		stdout.write('NO\n')


import random
t = int(input())
for _ in range(t):
	(v, c, n, m) = map(int, input().split())
	boo = 0
	if min(v, c) < m or v + c < n + m:
		print('No')
	else:
		print('Yes')


def solve(vanilla, chocolate, normal, contrary):
	(a, b) = sorted([vanilla, chocolate])
	if a >= contrary and a + b >= normal + contrary:
		return 'Yes'
	return 'No'
t = int(input())
for _ in range(t):
	(a, b, n, m) = [int(i) for i in input().split()]
	print(solve(a, b, n, m))


input = __import__('sys').stdin.readline
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('No')
		continue
	if m == 0:
		print('Yes')
		continue
	if a > b:
		if m <= b:
			print('Yes')
			continue
		else:
			print('No')
			continue
	elif m <= a:
		print('Yes')
		continue
	else:
		print('No')
		continue


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

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

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

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

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

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

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	for _ in range(ii()):
		(a, b, n, m) = mi()
		if a + b < n + m:
			print('No')
			continue
		if a > b:
			if b < m:
				print('No')
				continue
		elif a < m:
			print('No')
			continue
		print('Yes')
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 print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


testcase = int(input(''))
answerCollecter = []
for i in range(0, testcase):
	iceCREAM = input('')
	iceCREAM = iceCREAM.split(' ')
	vanilla = int(iceCREAM[0])
	chocolate = int(iceCREAM[1])
	EasyGuest = int(iceCREAM[2])
	DiffGuest = int(iceCREAM[3])
	if vanilla + chocolate >= EasyGuest + DiffGuest and DiffGuest <= min(vanilla, chocolate):
		answerCollecter.append('Yes')
	else:
		answerCollecter.append('No')
for i in range(0, len(answerCollecter)):
	print(answerCollecter[i])


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	flag = True
	S = min(a, b)
	M = max(a, b)
	if S < m or a + b < m + n:
		flag = False
	if flag:
		print('Yes')
	else:
		print('No')


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	if a <= b:
		if a >= m:
			print('Yes')
		else:
			print('No')
	elif b >= m:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	a = list(map(int, input().strip().split()))[:4]
	if a[0] + a[1] < a[2] + a[3]:
		print('No')
	elif a[1] >= a[0] and a[0] >= a[3]:
		print('Yes')
	elif a[1] >= a[0] and a[0] < a[3]:
		print('No')
	elif a[0] >= a[1] and a[1] >= a[3]:
		print('Yes')
	else:
		print('No')


import sys
import math
from math import factorial, inf, gcd, sqrt
from heapq import *
from functools import *
from itertools import *
from collections import *
from typing import *
from bisect import *
import random
sys.setrecursionlimit(10 ** 5)

def rarray():
	return [int(i) for i in input().split()]
t = 1
t = int(input())
for ii in range(t):
	(a, b, n, m) = rarray()
	if a > b:
		(a, b) = (b, a)
	if a >= m and a + b >= n + m:
		print('Yes')
	else:
		print('No')


t = int(input())
k = 0
for i in range(t):
	(a, b, n, m) = map(int, input().split(' '))
	if a > b:
		k = a
		a = b
		b = k
	if a < m:
		print('No')
		continue
	if n + m > a + b:
		print('No')
		continue
	print('Yes')


o = int(input())
for _ in range(o):
	(a, b, n, m) = map(int, input().split(' '))
	if m + n > a + b:
		print('No')
	elif m == 0:
		print('Yes')
	elif min(a, b) < m:
		print('No')
	else:
		print('Yes')


import sys
import math
import collections

def set_debug(debug_mode=False):
	if debug_mode:
		fin = open('input.txt', 'r')
		sys.stdin = fin

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

def get(s):
	return str(s % 9) + '9' * (s // 9)
t = int(input())
for ti in range(1, t + 1):
	(a, b, n, m) = int_input()
	if m <= min(a, b) and m + n <= a + b:
		print('YES')
	else:
		print('NO')


t = int(input())
for j in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	if a + b < m + n:
		print('No')
		continue
	if a > b:
		(a, b) = (b, a)
	while False:
		break
	if a < m:
		print('No')
		continue
	xx = a - m
	if b + xx < n:
		print('No')
		continue
	while False:
		break
	print('Yes')


from math import *
t = int(input())
while t:
	t = t - 1
	(a, b, n, m) = map(int, input().split())
	if a + b >= n + m:
		mi = min(a, b)
		mx = max(a, b)
		if m <= mi:
			mi -= m
			if mi + mx >= n:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
	else:
		print('No')


for iota in range(int(input())):
	abnm = input().split()
	a = int(abnm[0])
	b = int(abnm[1])
	n = int(abnm[2])
	m = int(abnm[3])
	if min(a, b) == 0 and m != 0:
		print('No')
	elif a + b < m + n:
		print('No')
		continue
	elif min(a, b) < m:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	if v + c < n + m:
		print('NO')
		continue
	d = min(v, c)
	if d < m:
		print('NO')
	else:
		print('YES')


t = int(input())
for tc in range(t):
	line = input().split()
	(v, c, g1, g2) = (int(line[0]), int(line[1]), int(line[2]), int(line[3]))
	if v + c >= g1 + g2 and min(v, c) >= g2:
		print('Yes')
	else:
		print('No')


tc = int(input(''))
while tc != 0:
	(v1, c1, gx, gz) = input('').split(' ')
	v = int(v1)
	c = int(c1)
	g1 = int(gx)
	g2 = int(gz)
	if v + c < g1 + g2:
		print('No')
	elif g2 > min(v, c):
		print('No')
	else:
		print('Yes')
	tc = tc - 1


for _ in range(int(input())):
	(v, c, t1, t2) = map(int, input().split())
	if v + c >= t1 + t2:
		if min(v, c) >= t2:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('NO')
		continue
	if a > b:
		(a, b) = (b, a)
	x = min(n, b - a)
	b -= x
	n -= x
	if a == b:
		xx = min(n, m)
		n -= xx
		m -= xx
		a -= xx
		b -= xx
		if a < 0 or b < 0:
			print('NO')
			continue
		if min(a, b) < m:
			print('NO')
			continue
		if a + b < n:
			print('NO')
			continue
	elif min(a, b) < m:
		print('NO')
		continue
	print('YES')
	continue


t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	(a, b) = (min(a, b), max(a, b))
	if b >= n and a >= m:
		print('Yes')
	else:
		if b < n and a >= m:
			if b - a + m + 2 * (a - m) >= n:
				print('Yes')
				continue
		print('No')


import math
from collections import deque
from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	while n != m:
		was = [a, b, n, m]
		if n > m:
			if a > b:
				bf = min(n - m, a - b)
				a -= bf
				n -= bf
			elif a < b:
				bf = min(n - m, abs(b - a) + 1)
				b -= bf
				n -= bf
			else:
				bf = n - m
				a -= bf // 2
				b -= bf // 2 + bf % 2
				n -= bf
		elif a > b:
			bf = m - n
			m -= bf
			b -= bf
		else:
			bf = min(m - n, abs(a - b) + 1)
			a -= bf
			m -= bf
		if a < 0 or b < 0 or m < 0 or (n < 0):
			break
		if was == [a, b, n, m]:
			break
	if a >= n and b >= m and (a >= 0) and (b >= 0) and (n >= 0) and (m >= 0) and (n == m):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(v, c, a, b) = map(int, input().split())
	if v + c < a + b or min(v, c) < b:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	c_res = v + c
	g_res = n + m
	if c_res < g_res:
		print('No')
		continue
	m_c = min(v, c)
	if m_c < m:
		print('No')
	else:
		print('Yes')


t = int(input())
ans = []
for i in range(t):
	(a, b, n, m) = input().split()
	a = int(a)
	b = int(b)
	n = int(n)
	m = int(m)
	if a + b < m + n:
		ans.append('No')
		continue
	elif min(a, b) >= m:
		ans.append('Yes')
		continue
	else:
		ans.append('No')
		continue
for an in ans:
	print(an)


T = int(input())
while T:
	(a, b, n, m) = map(int, input().split())
	x = min(a, b)
	y = max(a, b)
	F = 'No'
	if x >= m:
		x = x - m
		y = y + x
		if y >= n:
			F = 'Yes'
	print(F)
	T = T - 1


import math
from decimal import *
getcontext().prec = 30
t = int(input())
while t:
	t -= 1
	(a, b, n, m) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	if a + b < n + m:
		print('No')
	elif m > a:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(a, b, n, m) = [int(x) for x in input().split()]
	if m > min(a, b) or m + n > a + b:
		print('No')
		continue
	else:
		print('Yes')


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	k = 0
	if a + b < n + m:
		k = 0
	else:
		k = 1
	if k == 1:
		if min(a, b) >= m:
			k = 1
		else:
			k = 0
	if k == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for T in range(t):
	(a, b, n, m) = [int(x) for x in input().split()]
	mn = min(a, b)
	if m + n > a + b or m > mn:
		print('No')
	else:
		print('Yes')


for t in range(int(input())):
	(a, b, n, m) = list(map(int, input().split()))
	if n + m > a + b:
		print('No')
	elif a == 0 and m > 0:
		print('No')
	elif b == 0 and m > 0:
		print('No')
	elif a > b and b < m and (max(a, b) - n >= min(a, b)):
		print('No')
	elif a <= b and a < m and (max(a, b) - n >= min(a, b)):
		print('No')
	elif min(a, b) >= m:
		print('Yes')
	else:
		print('No')


t = int(input(''))

def solve(a, b, n, m):
	if a + b < n + m:
		return 'No'
	v = a
	c = b
	if c > v:
		(v, c) = (c, v)
		(a, b) = (b, a)
	n -= v - c
	v -= v - c
	m -= v
	v = 0
	n -= c
	if m <= 0 and v <= 0:
		return 'Yes'
	else:
		return 'No'
for i in range(t):
	[a, b, n, m] = [int(num) for num in input('').split(' ')]
	print(solve(a, b, n, m))


import sys, bisect, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range

def Golf():
	(n, *t) = map(int, open(0).read().split())

def I():
	return int(input())

def S_():
	return input()

def IS():
	return input().split()

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

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

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

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def RA():
	return map(int, open(0).read().split())

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in range(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in range(base ** n):
		s = [tb // base ** bt % base for bt in range(n)]
		rt += [s]
	return rt

def gcd(x, y):
	if y == 0:
		return x
	if x % y == 0:
		return y
	while x % y != 0:
		(x, y) = (y, x % y)
	return y

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
l_alp = string.ascii_lowercase
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()

class Tree:

	def __init__(self, inp_size=None, ls=None, init=True, index=1):
		self.LCA_init_stat = False
		self.ETtable = []
		if init:
			if ls == None:
				self.stdin(inp_size, index=index)
			else:
				self.node_size = len(ls) + 1
				(self.edges, _) = GI(self.node_size, self.node_size - 1, ls, index=index)
		return

	def stdin(self, inp_size=None, index=1):
		if inp_size == None:
			self.node_size = int(input())
		else:
			self.node_size = inp_size
		(self.edges, _) = GI(self.node_size, self.node_size - 1, index=index)
		return

	def listin(self, ls, index=0):
		self.node_size = len(ls) + 1
		(self.edges, _) = GI(self.node_size, self.node_size - 1, ls, index=index)
		return

	def dfs(self, x, func=lambda pr, prv, nx, dist: prv + dist, root_v=0):
		q = deque([x])
		v = [None] * self.node_size
		v[x] = root_v
		while q:
			c = q.pop()
			for (nb, d) in self.edges[c]:
				if v[nb] == None:
					q.append(nb)
					v[nb] = func(c, v[c], nb, d)
		return v

	def bfs(self, x, func=lambda pr, prv, nx, dist: prv + dist, root_v=0):
		q = deque([x])
		v = [None] * self.node_size
		v[x] = root_v
		while q:
			c = q.popleft()
			for (nb, d) in self.edges[c]:
				if v[nb] == None:
					q.append(nb)
					v[nb] = func(c, v[c], nb, d)
		return v

	def parent(self, x):
		return self.dfs(0, func=lambda pr, prv, nx, dist: pr, root_v=-1)

	def topological_sort(self, x):
		tps = []
		q = deque([x])
		v = [None] * self.node_size
		v[x] = 0
		while q:
			c = q.popleft()
			tps.append(c)
			for (nb, d) in self.edges[c]:
				if v[nb] == None:
					q.append(nb)
					v[nb] = 0
		return tps

	def EulerTour(self, x):
		q = deque()
		q.append(x)
		self.depth = [None] * self.node_size
		self.depth[x] = 0
		self.ETtable = []
		self.ETdepth = []
		self.ETin = [-1] * self.node_size
		self.ETout = [-1] * self.node_size
		cnt = 0
		while q:
			c = q.pop()
			if c < 0:
				ce = ~c
			else:
				ce = c
				for (nb, d) in self.edges[ce]:
					if self.depth[nb] == None:
						q.append(~ce)
						q.append(nb)
						self.depth[nb] = self.depth[ce] + 1
			self.ETtable.append(ce)
			self.ETdepth.append(self.depth[ce])
			if self.ETin[ce] == -1:
				self.ETin[ce] = cnt
			else:
				self.ETout[ce] = cnt
			cnt += 1
		return

	def doubling_LCA(self, root, x, y):
		if self.LCA_init_stat == False:
			self.depth = [None] * self.node_size
			self.depth = self.bfs(0, func=lambda pr, prv, nxt, dist: prv + 1)
			self.par = self.bfs(0, func=lambda pr, prv, nxt, dist: pr)
			self.db = [self.par]
			for i in range(self.node_size.bit_length()):
				self.db += [[self.db[-1][self.db[-1][i]] for i in range(self.node_size)]]
			self.LCA_init_stat = True
		dx = self.depth[x]
		dy = self.depth[y]
		if dx > dy:
			(dx, dy) = (dy, dx)
		c = self.node_size.bit_length()
		while c > 0:
			if dx + c <= dy:
				x = self.db[c][x]
				dx += 1 << c
			c >>= 1
		if x == y:
			return x
		c = self.node_size.bit_length()
		while c > 0:
			if self.db[c][x] != self.db[c][y]:
				x = self.db[c][x]
				y = self.db[c][y]
			c >>= 1
		return self.par[x]

	def LCA_init(self, root):
		self.EulerTour(root)
		self.st = SparseTable(self.ETdepth, init_func=min, init_idl=inf)
		self.LCA_init_stat = True
		return

	def LCA(self, root, x, y):
		if self.LCA_init_stat == False:
			self.LCA_init(root)
		(xin, xout) = (self.ETin[x], self.ETout[x])
		(yin, yout) = (self.ETin[y], self.ETout[y])
		a = min(xin, yin)
		b = max(xout, yout, xin, yin)
		id_of_min_dep_in_et = self.st.query_id(a, b + 1)
		return self.ETtable[id_of_min_dep_in_et]

	def __str__(self):
		return str(self.edges)

	def show(self):
		if all([all([d == 1 for (nd, d) in e]) for e in self.edges]):
			print([[nd for (nd, d) in e] for e in self.edges])
		else:
			print(self)

	def dfs2(self, x, func=lambda pr, prv, nx, dist: prv + dist, root_v=0):
		q = deque([x])
		v = [None] * self.node_size
		v[x] = root_v
		dfs_tr = [x]
		while q:
			c = q.pop()
			for (nb, d) in self.edges[c]:
				if v[nb] == None:
					q.append(nb)
					v[nb] = func(c, v[c], nb, d)
					dfs_tr += (nb,)
		return (v, dfs_tr)

class SparseTable:

	def __init__(self, ls, init_func=min, init_idl=float('inf')):
		self.func = init_func
		self.idl = init_idl
		self.size = len(ls)
		self.N0 = self.size.bit_length()
		self.table = [ls[:]]
		self.index = [list(range(self.size))]
		self.lg = [0] * (self.size + 1)
		for i in range(2, self.size + 1):
			self.lg[i] = self.lg[i >> 1] + 1
		for i in range(self.N0):
			tmp = [self.func(self.table[i][j], self.table[i][min(j + (1 << i), self.size - 1)]) for j in range(self.size)]
			tmp_id = [self.index[i][j] if self.table[i][j] == self.func(self.table[i][j], self.table[i][min(j + (1 << i), self.size - 1)]) else self.index[i][min(j + (1 << i), self.size - 1)] for j in range(self.size)]
			self.table += [tmp]
			self.index += [tmp_id]

	def query(self, l, r):
		if r > self.size:
			r = self.size
		N = self.lg[r - l]
		return self.func(self.table[N][l], self.table[N][max(0, r - (1 << N))])

	def query_id(self, l, r):
		if r > self.size:
			r = self.size
		N = self.lg[r - l]
		(a, b) = (self.index[N][l], self.index[N][max(0, r - (1 << N))])
		if self.table[0][a] == self.func(self.table[N][l], self.table[N][max(0, r - (1 << N))]):
			b = a
		return b

	def right_bound(self, pos, x):
		k = (self.size - pos).bit_length()
		for j in range(k)[::-1]:
			nx = pos + (1 << j)
			if nx < n and self.query(pos, nx + 1) <= x:
				pos += 1 << j
		return pos

	def left_bound(self, pos, x):
		k = pos.bit_length()
		for j in range(k)[::-1]:
			nx = pos - (1 << j)
			if 0 <= nx and self.query(nx, pos + 1) <= x:
				pos -= 1 << j
		return pos

	def __str__(self):
		return str(self.table[0])

	def print(self):
		for i in self.table:
			print(*i)
show_flg = False
show_flg = True
ans = 0
for _ in range(I()):
	ans = 0
	(v, c, n, m) = LI()
	ans = (v, c, n, m)
	if v + c < n + m:
		ans = 'NO'
	elif v + c >= n + m and n >= m:
		if min(v, c) >= m:
			ans = 'YES'
		else:
			ans = 'NO'
	else:
		v -= n
		c -= n
		(n, m) = (0, m - n)
		ans = (v, c, n, m)
		if min(v, c) >= m:
			ans = 'Yes'
		else:
			ans = 'No'
	print(ans)


import sys
input = sys.stdin.readline
for f in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	poss = True
	if m > min(a, b):
		poss = False
	if m + n > a + b:
		poss = False
	if poss:
		print('YES')
	else:
		print('NO')


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

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

def INT():
	return int(input())

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

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
for i in range(INT()):
	(a, b, n, m) = MAP()
	if a + b == 0:
		print('No')
	elif n + m > a + b:
		print('No')
	else:
		if a > b:
			m1 = b
		else:
			m1 = a
		if m1 < m:
			print('No')
		else:
			print('Yes')


t = int(input())
for case in range(t):
	(v, c, n, m) = map(int, input().split())
	if v > c:
		nv = max(c, v - n)
		n -= v - nv
		v = nv
	elif c > v:
		nc = max(v, c - n)
		n -= c - nc
		c = nc
	w = min(n, m)
	m -= w
	n -= w
	v -= w
	c -= w
	if v < 0 or c < 0:
		print('NO')
	elif n:
		assert not m
		if v + c >= n:
			print('YES')
		else:
			print('NO')
	else:
		assert not n
		if min(v, c) >= m:
			print('YES')
		else:
			print('NO')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	small = min(a, b)
	large = max(a, b)
	if small - m < 0:
		print('No')
		continue
	small -= m
	if small + large - n < 0:
		print('No')
		continue
	print('Yes')


t = int(input())
for _ in range(t):
	inp = list(map(int, input().split()))
	v = inp[0]
	c = inp[1]
	f = inp[2]
	s = inp[3]
	flag = 0
	if v + c < f + s:
		print('No')
		flag = 1
	if min(v, c) < s and flag == 0:
		print('No')
		flag = 1
	if flag == 0:
		print('Yes')


from collections import Counter as C, defaultdict as D, deque as Q
from operator import itemgetter as I
from itertools import product as P
from bisect import bisect_left as BL, bisect_right as BR
from heapq import heappush as HPUSH, heappop as HPOP
from math import floor as MF, ceil as MC, gcd as MG, factorial as F, sqrt as SQRT

def factors(n):
	largest = 1
	for i in range(2, MC(SQRT(n)) + 1):
		if n % i == 0:
			largest = max(largest, i)
			x = n // i
			largest = max(largest, x)
	return largest

def main():
	for _ in range(int(input())):
		(v, c, n, m) = map(int, input().split())
		if m <= min(v, c) and n + m <= v + c:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
for i in range(t):
	array = list(map(int, input().rstrip().split()))
	a = array[0]
	b = array[1]
	n = array[2]
	m = array[3]
	if a + b < n + m:
		print('No')
	else:
		d = min(a, b)
		if d < m:
			print('No')
		else:
			print('Yes')


outputs = []
for __ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		outputs.append('No')
	else:
		maxm = max(a, b)
		minm = min(a, b)
		if m > minm:
			outputs.append('No')
		else:
			minm -= m
			if maxm + minm >= n:
				outputs.append('Yes')
			else:
				outputs.append('No')
for output in outputs:
	print(output)


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	elif a > b:
		if a - b > n and b >= m:
			print('Yes')
			continue
		elif a - b > n and b < m:
			print('No')
			continue
		else:
			a = b
			n = n - (a - b)
	elif a < b:
		if b - a > n and a >= m:
			print('Yes')
			continue
		elif b - a > n and a < m:
			print('No')
			continue
		else:
			b = a
			n = n - (b - a)
	if n <= b and m <= a:
		print('Yes')
	elif m > a:
		print('No')
	else:
		print('Yes')


import math
from decimal import *
import random
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if n + m <= a + b and m <= min(a, b):
		print('YES')
	else:
		print('NO')


import sys
import random
from fractions import Fraction
from math import *

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

def iinput():
	return int(input())

def finput():
	return float(input())

def tinput():
	return input().split()

def linput():
	return list(input())

def rinput():
	return map(int, tinput())

def fiinput():
	return map(float, tinput())

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

def trinput():
	return tuple(rinput())

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

def NOYES(fl):
	if fl:
		print('NO')
	else:
		print('YES')

def YESNO(fl):
	if fl:
		print('YES')
	else:
		print('NO')

def main():
	(a, b, n, m) = rinput()
	if a + b < n + m or min(a, b) < m:
		print('NO')
	else:
		if a + 1 < b:
			a -= m
		else:
			b -= m
		if a > b + 1:
			if b + n < a + 1:
				(a, n) = (a - n, 0)
			else:
				(n, a) = (n + b - a, b)
		elif a + n < b + 2:
			(b, n) = (b - n, 0)
		else:
			(n, b) = (n + a - b, a)
		YESNO(a + 1 > n // 2 and b + 1 > n // 2 - n % 2)
for i in range(iinput()):
	main()


import sys, os
from io import BytesIO, IOBase
import collections, itertools, bisect, heapq, math, string
from decimal import *
BUFSIZE = 8192
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')

def main():
	t = int(input())
	for i in range(t):
		(a, b, n, m) = map(int, input().split())
		if a > b:
			(a, b) = (b, a)
		if a < m:
			print('No')
			continue
		if a + b < n + m:
			print('No')
			continue
		print('Yes')
main()


for t in range(int(input())):
	(a, b, n, m) = map(int, input().split(' '))
	print('No' if min(a, b) < m or a + b < n + m else 'yes')


import sys
import heapq

def main():
	t = int(input())
	for _ in range(t):
		(a, b, n, m) = map(int, sys.stdin.readline().split())
		if n + m > a + b:
			print('No')
			continue
		if min(a, b) >= m:
			print('Yes')
			continue
		diff = abs(a - b)
		if diff > n:
			print('No')
			continue
		else:
			minAB = min(a, b)
			a = minAB
			b = minAB
			n -= diff
			minNM = min(n, m)
			a -= minNM
			b -= minNM
			n -= minNM
			m -= minNM
			if m > min(a, b):
				print('No')
			else:
				print('Yes')
	return
main()


from math import gcd
import sys

def inp():
	return sys.stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(a, b, n, m) = map(int, inp().split())
	if a + b >= n + m and m <= min(a, b):
		print('Yes')
	else:
		print('No')


from math import *

def r1(t):
	return t(input())

def r2(t):
	return [t(i) for i in input().split()]
for _ in range(r1(int)):
	(a, b, n, m) = r2(int)
	if n + m > a + b or m > min(a, b):
		print('No')
	else:
		print('Yes')


for t in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	ans = 'Yes'
	if a + b < n + m:
		ans = 'No'
	elif a < b:
		if a < m:
			ans = 'No'
	elif b < m:
		ans = 'No'
	print(ans)


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

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

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

def getStr():
	return input().strip()
t = getInt()
for _ in range(t):
	(a, b, n, m) = getVars()
	res = 'No'
	if a + b >= n + m:
		if min(a, b) >= m:
			res = 'Yes'
	print(res)


t = int(input())
for i in range(t):
	val = str(input())
	arr = val.split(' ')
	a = int(arr[0])
	b = int(arr[1])
	n = int(arr[2])
	m = int(arr[3])
	if a >= b:
		if b >= m:
			if a + (b - m) >= n:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
	elif b > a:
		if a >= m:
			if b + (a - m) >= n:
				print('Yes')
			else:
				print('No')
		else:
			print('No')


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
sys.setrecursionlimit(int(pow(10, 6)))
mod = int(pow(10, 9) + 7)
mod2 = 998244353

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

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
t = 1
t = int(input())
for _ in range(t):
	(a, b, n, m) = L()
	if a + b < n + m or min(a, b) < m:
		print('No')
		continue
	else:
		print('Yes')


def isNoAngryGuestPossible(nVanilla, nChocolate, nFirstTypeGuests, nSecondTypeGuests):
	(nLessCookies, nMoreCookies) = sorted((nVanilla, nChocolate))
	firstTypeDifference = nFirstTypeGuests - nMoreCookies
	secondTypeDifference = nLessCookies - nSecondTypeGuests
	if firstTypeDifference <= 0:
		return 'Yes' if secondTypeDifference >= 0 else 'No'
	return 'Yes' if firstTypeDifference <= secondTypeDifference else 'No'

def testCases_1371c():
	return map(int, input().split(' '))
nTestCases = int(input())
testCases = tuple((testCases_1371c() for x in range(nTestCases)))
tuple((print(isNoAngryGuestPossible(*testCase)) for testCase in testCases))


for _ in range(int(input())):
	(v, c, goodguy, badguy) = map(int, input().split())
	if goodguy + badguy > v + c:
		print('No')
		continue
	if badguy > min(v, c):
		print('No')
		continue
	print('Yes')


t = int(input())
while t:
	line = input().split()
	(a, b, n, m) = (int(line[0]), int(line[1]), int(line[2]), int(line[3]))
	if a < b:
		(a, b) = (b, a)
	if m > b:
		print('No')
	else:
		b -= m
		d = min(a - b, n)
		a -= d
		n -= d
		if n // 2 + n % 2 > b:
			print('No')
		else:
			print('Yes')
	t -= 1


import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	(a, b, n, m) = map(int, input().split())
	if min(a, b) < m:
		print('No')
	elif a + b < n + m:
		print('No')
	else:
		print('Yes')


for qq in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a < b:
		(a, b) = (b, a)
	if b >= m:
		b -= m
		m = 0
	else:
		print('No')
		continue
	if a + b >= n:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(x, y, r, s) = map(int, input().split())
	a = s <= min(x, y)
	b = s + r <= x + y
	print('Yes' if a and b else 'No')


mod = 1000000007
eps = 10 ** (-9)

def main():
	import sys
	input = sys.stdin.readline
	for _ in range(int(input())):
		(A, B, N, M) = list(map(int, input().split()))
		if A + B < N + M:
			print('No')
		else:
			mi = min(A, B)
			if mi < M:
				print('No')
			else:
				print('Yes')

def __starting_point():
	main()
__starting_point()


t = int(input())
for i in range(t):
	f = lambda : map(int, input().split(' '))
	(a, b, n, m) = f()
	mini = min(a, b)
	maxi = max(a, b)
	if n + m <= a + b and m <= min(a, b):
		print('YES')
	else:
		print('NO')


t = int(input())
for o in range(t):
	l = str.split(input(), ' ')
	a = int(l[0])
	b = int(l[1])
	n = int(l[2])
	m = int(l[3])
	flag = 1
	if a + b < n + m:
		flag = 0
	if a > b:
		if b < m:
			flag = 0
	elif a < m:
		flag = 0
	if flag == 1:
		print('YES')
	else:
		print('NO')


def tran(arr):
	(a, b, n, m) = (arr[0], arr[1], arr[2], arr[3])
	if a + b < m + n:
		return 'No'
	elif a == 0 or b == 0:
		if m == 0:
			return 'Yes'
		else:
			return 'No'
	elif a == b:
		if m == n:
			return 'Yes'
		elif m > a:
			return 'No'
		else:
			return 'Yes'
	elif m > a or m > b:
		return 'No'
	else:
		return 'Yes'
t = int(input())
ans = []
for i in range(t):
	arr = list(map(int, input().rstrip().split()))
	p = tran(arr)
	ans.append(p)
for i in ans:
	print(i)


import sys
import math
read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
t = int(input())
for case in range(t):
	(a, b, n, m) = map(int, input().split())
	if min(a, b) >= m:
		if a + b < m + n:
			print('No')
		else:
			print('Yes')
	else:
		print('No')


try:
	t = int(input())
	while t:
		(a, b, n, m) = [int(x) for x in input().split()]
		cook = a + b
		if a > b:
			min = b
		else:
			min = a
		mem = n + m
		if cook >= mem and min >= m:
			print('Yes')
		else:
			print('No')
		t -= 1
except:
	pass


from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect

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

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

def LS():
	return [list(x) for x in sys.stdin.readline().split()]

def S():
	res = list(sys.stdin.readline())
	if res[-1] == '\n':
		return res[:-1]
	return res

def IR(n):
	return [I() for i in range(n)]

def LIR(n):
	return [LI() for i in range(n)]

def SR(n):
	return [S() for i in range(n)]

def LSR(n):
	return [LS() for i in range(n)]
sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
	t = I()
	for _ in range(t):
		(a, b, n, m) = LI()
		if a + b < n + m:
			print('No')
			continue
		if a <= b:
			(a, b) = (b, a)
		r = a - b
		a -= min(n, r)
		n -= min(n, r)
		if a != b:
			if b < m:
				print('No')
			else:
				b -= m
				if n <= a + b:
					print('Yes')
				else:
					print('No')
		else:
			r = min(a, b, n, m)
			a -= r
			b -= r
			n -= r
			m -= r
			if a == 0:
				if n == m == 0:
					print('Yes')
				else:
					print('No')
			elif m > a:
				print('No')
			else:
				print('Yes')
	return

def __starting_point():
	solve()
__starting_point()


t = int(input())
for _ in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	if a + b < n + m:
		print('No')
	else:
		c = max(a, b)
		d = min(a, b)
		if c - d >= n:
			if d >= m:
				print('Yes')
			else:
				print('No')
		else:
			n = n - (c - d)
			if n >= m:
				print('Yes')
			elif d >= m:
				print('Yes')
			else:
				print('No')


for test_case in range(int(input())):
	(v, c, first, second) = map(int, input().split())
	if v + c >= first + second and min(v, c) >= second:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m or min(a, b) < m:
		print('No')
	else:
		print('Yes')


n = int(input())
for x in range(n):
	(w, x, y, z) = map(int, input().split())
	if y + z > w + x:
		print('NO')
	elif z > w or z > x:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('NO')
	else:
		x = min(a, b)
		y = max(a, b)
		if x >= m:
			print('YES')
		else:
			print('NO')


import os
import sys
from io import BytesIO, IOBase
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')

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

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

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 998244353
INF = float('inf')
from math import factorial
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def main():
	for _ in range(N()):
		(a, b, n, m) = RL()
		mi = min(a, b)
		if mi >= m and a + b >= n + m:
			print('Yes')
		else:
			print('No')
main()


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	f = 0
	if a < m or b < m:
		f = 1
	if a + b < n + m:
		f = 1
	if f:
		print('No')
	else:
		print('Yes')


t = int(input())
for k in range(t):
	(a, b, n, m) = map(int, input().split())
	if a < m or b < m:
		print('No')
	else:
		if a >= b:
			b -= m
		else:
			a -= m
		if a + b >= n:
			print('Yes')
		else:
			print('No')


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		(a, b, n, m) = list(map(int, input().split()))
		if n + m > a + b:
			yield 'No'
		elif m <= min(a, b):
			yield 'Yes'
		else:
			yield 'No'
t = int(input())
ans = gift()
print(*ans, sep='\n')


for _ in range(int(input())):
	arr = [int(i) for i in input().split()]
	max1 = max(arr[0], arr[1])
	min1 = min(arr[0], arr[1])
	if arr[3] <= min1 and arr[1] + arr[0] >= arr[2] + arr[3]:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b >= m + n:
		if min(a, b) >= max(n, m) and a > 0 and (b > 0):
			print('yes')
		elif min(a, b) >= m:
			print('yes')
		else:
			print('no')
	else:
		print('no')


t = int(input())
for q in range(t):
	(v, c, n, m) = map(int, input().split())
	if n + m <= v + c and m <= c and (m <= v):
		print('Yes')
	else:
		print('No')


import sys
from collections import defaultdict as dd
from collections import deque
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

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

def gi():
	return [x for x in input().split()]

def fi():
	return int(input())

def si():
	return list(input().rstrip())

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

def gh():
	sys.stdout.flush()

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)

def bo(i):
	return ord(i) - ord('a')
t = fi()
while t > 0:
	t -= 1
	(a, b, n, m) = mi()
	ans = ['Yes', 'No']
	if a + b < n + m:
		print(ans[1])
		continue
	if min(a, b) >= m:
		print(ans[0])
	else:
		print(ans[1])


import sys
import math
strInp = lambda : input().strip().split()
intInp = lambda : list(map(int, strInp()))
for t in range(int(input())):
	(v, c, n, m) = intInp()
	if m <= min(v, c) and v + c >= n + m:
		print('YES')
	else:
		print('NO')


cases = int(input())
for t in range(cases):
	(a, b, n, m) = list(map(int, input().split()))
	if a + b < n + m or min(a, b) < m:
		print('No')
	else:
		print('Yes')


t = int(input())
while t > 0:
	(a, b, x, y) = list(map(int, input().split()))
	if a + b < x + y:
		print('No')
	else:
		temp = min(x, y)
		if a < temp or b < temp:
			print('No')
		else:
			a -= temp
			b -= temp
			if x > y:
				x -= temp
				if a + b >= x:
					print('Yes')
				else:
					print('No')
			else:
				y -= temp
				a = min(a, b)
				if y > a:
					print('No')
				else:
					print('Yes')
	t -= 1


test = int(input())
for ii in range(test):
	(a, b, n, m) = list(map(int, input().split()))
	if a + b < m + n:
		print('No')
		continue
	if a > b:
		(a, b) = (b, a)
	if a < m:
		print('No')
		continue
	rem = a - m
	if b + rem < n:
		print('No')
		continue
	print('Yes')


import math
for _ in range(int(input())):
	(a, b, n, m) = [int(x) for x in input().split()]
	if m <= min(a, b) and n + m <= a + b:
		print('YES')
	else:
		print('NO')


def read_line(type=int):
	return list(map(type, input().split()))

def sum_from_1_to_(i):
	return i * (i + 1) // 2

def is_odd(a):
	return a % 2 == 0
t = int(input())
for _ in range(t):
	(v, c, n, m) = read_line()
	ans = min(v, c) >= m and v + c >= n + m
	print(['No', 'Yes'][ans])


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt, log2, floor
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
decimal.getcontext().prec = 46

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

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def modefiedSieve():
	mx = 10 ** 7 + 1
	sieve = [-1] * mx
	for i in range(2, mx):
		if sieve[i] == -1:
			sieve[i] = i
			for j in range(i * i, mx, i):
				if sieve[j] == -1:
					sieve[j] = i
	return sieve

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

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

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

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

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def DFS(n, s, adj):
	visited = [False for i in range(n + 1)]
	stack = []
	stack.append(s)
	while len(stack):
		s = stack[-1]
		stack.pop()
		if not visited[s]:
			visited[s] = True
		for node in adj[s]:
			if not visited[node]:
				stack.append(node)

def maxSubArraySum(a, size):
	maxint = 10 ** 10
	max_so_far = -maxint - 1
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def countSetBits(n):
	count = 0
	while n:
		n &= n - 1
		count += 1
	return count

def solve():
	(a, b, n, m) = num_input()
	if a == b and b == 0:
		print('NO')
		return
	if m == 0:
		if a + b >= n:
			print('YES')
		else:
			print('NO')
		return
	if n == 0:
		if a == 0 or b == 0:
			print('NO')
		elif min(a, b) >= m:
			print('YES')
		else:
			print('NO')
		return
	if min(a, b) < m:
		print('NO')
		return
	if a < b:
		a -= m
	else:
		b -= m
	if a + b >= n:
		print('YES')
		return
	print('NO')
t = 1
t = int(input())
for _ in range(t):
	solve()


def ans(a, b, n, m):
	if n + m > a + b:
		return 'No'
	if min(a, b) < m:
		return 'No'
	return 'Yes'
m = int(input())
for i in range(m):
	ar = input().split()
	a = int(ar[0])
	b = int(ar[1])
	n = int(ar[2])
	m = int(ar[3])
	print(ans(a, b, n, m))


def cookie(a, b, n, m):
	if m > 0 and (a == 0 or b == 0):
		return 'No'
	elif a + b < n + m:
		return 'No'
	elif a >= m and b >= m:
		return 'Yes'
	elif m > a or m > b:
		return 'No'
	return 'Yes'
i = int(input())
for j in range(i):
	a_b_n_m = [int(ele) for ele in input().split()]
	a = a_b_n_m[0]
	b = a_b_n_m[1]
	n = a_b_n_m[2]
	m = a_b_n_m[3]
	print(cookie(a, b, n, m))


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

def solve(A, B, N, M):
	if A + B < N + M:
		return False
	if A > B:
		delta = min(A - B, N)
		N -= delta
		A -= delta
	else:
		delta = min(B - A, N)
		N -= delta
		B -= delta
	if N == 0:
		return M <= min(A, B)
	assert A == B
	delta = min(N, M)
	N -= delta
	M -= delta
	A -= delta
	B -= delta
	assert A >= 0 and B >= 0
	assert N == 0 or M == 0
	if M == 0:
		return True
	return M <= min(A, B)
TC = int(input())
for tc in range(TC):
	(A, B, N, M) = map(int, input().split())
	res = solve(A, B, N, M)
	print('Yes' if res else 'No')


def cookie(a, b, n, m):
	if a + b < n + m:
		return 'No'
	elif m <= a and m <= b:
		return 'Yes'
	else:
		return 'No'
test = int(input())
matrix = []
for i in range(test):
	lst = list(map(lambda elem: int(elem), input().split(' ')))
	matrix.append(lst)
for [a, b, n, m] in matrix:
	print(cookie(a, b, n, m))


from sys import stdin, stdout
read = stdin.readline
write = stdout.write
for _ in range(int(read())):
	(a, b, n, m) = map(int, read().split())
	flag = True
	if a + b < m + n:
		flag = False
	elif min(a, b) < m:
		flag = False
	if flag:
		write('Yes\n')
	else:
		write('No\n')


import math
t = int(input())
for w in range(t):
	(a, b, n, m) = (int(i) for i in input().split())
	if n + m > a + b:
		print('No')
	else:
		k = min(a, b)
		if k >= m:
			print('Yes')
		else:
			print('No')


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
from collections import deque
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if min(a, b) < m or n + m > a + b:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(a, b, n, m) = list(map(int, input().split()))
	if a + b < n + m:
		print('No')
	else:
		first = max(a, b) - min(a, b)
		n -= first
		a = min(a, b)
		b = min(a, b)
		if m > a:
			print('No')
		else:
			temp = m
			m -= a
			a -= temp
			if n > a + b:
				print('No')
			else:
				print('Yes')


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys

def solve(a, b, n, m):
	if a + b < n + m:
		return 'No'
	if min(a, b) < m:
		return 'No'
	return 'Yes'

def main():
	t = int(input())
	for _ in range(t):
		(a, b, n, m) = map(int, input().split())
		ans = solve(a, b, n, m)
		sys.stdout.write(str(ans) + '\n')
main()


t = int(input())
for t in range(0, t):
	numbers = [int(str) for str in input().split()]
	a = numbers[0]
	b = numbers[1]
	n = numbers[2]
	m = numbers[3]
	if min(a, b) >= m:
		if a + b - m < n:
			print('No')
		else:
			print('Yes')
	else:
		print('No')


t = int(input())
while t:
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('NO')
	else:
		k = abs(a - b)
		ty = 0
		if a > b:
			n -= a - b
			a = b
			ty = 1
		elif a < b:
			n -= b - a
			b = a
			ty = 2
		if n < 0:
			if ty == 1:
				a -= n
			else:
				b -= n
			if a > b:
				if b >= m:
					print('YES')
				else:
					print('NO')
			elif a >= m:
				print('YES')
			else:
				print('NO')
		else:
			a -= min(n, m)
			b -= min(n, m)
			k = min(n, m)
			if a < 0 or b < 0:
				print('NO')
			elif k == n and m == k:
				print('YES')
			elif k == n:
				m -= k
				if a >= m:
					print('YES')
				else:
					print('NO')
			else:
				n -= k
				g = (n + 1) // 2
				if b >= g and a >= n - g:
					print('YES')
				else:
					print('NO')
	t -= 1


import time, math, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

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

def IO():
	return stdin.readline()

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

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

def P(x):
	return stdout.write(str(x))

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

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

def readTree():
	v = int(input())
	adj = [set() for i in range(v + 1)]
	for i in range(v - 1):
		(u1, u2) = In()
		adj[u1].add(u2)
		adj[u2].add(u1)
	return (adj, v)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 9 + 7

def solve():
	(a, b, n, m) = IP()
	if a + b < n + m:
		print('NO')
		return
	else:
		(mx, mn) = (max(a, b), min(a, b))
		diff = mx - mn
		if diff > n:
			n = 0
			if mn >= m:
				print('YES')
				return
		else:
			mx = mn
			n = n - diff
			if mx >= m:
				print('YES')
				return
	print('NO')
	return
t = II()
for i in range(t):
	solve()


T = int(input())
for _ in range(T):
	(A, B, N, M) = [int(x) for x in input().split(' ')]
	print('Yes' if min(A, B) >= M and A + B >= N + M else 'No')


import sys

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

def input_split():
	return [int(i) for i in input().split()]
testCases = int(input())
answers = []
for _ in range(testCases):
	(a, b, n, m) = input_split()
	if min(a, b) < m:
		ans = 'no'
	else:
		pending = a + b - m
		if pending >= n:
			ans = 'yes'
		else:
			ans = 'no'
	answers.append(ans)
print(*answers, sep='\n')


tst = int(input())
t = 1
while t <= tst:
	(v, c, n, m) = map(int, input().split())
	if v + c < n + m:
		print('NO')
	else:
		x = min(v, c)
		if m <= x:
			print('YES')
		else:
			print('NO')
	t += 1


def solve():
	(v, c, t1, t2) = list(map(int, input().split()))
	if v + c < t1 + t2:
		return False
	if t2 > min(v, c):
		return False
	return True

def main():
	t = int(input())
	for i in range(t):
		if solve():
			print('Yes')
		else:
			print('No')
main()


import sys
from fractions import gcd
from math import ceil, sqrt, sin, pi, tan
from collections import defaultdict
read = sys.stdin.buffer.readline
import heapq
mi = lambda : map(int, read().split())
li = lambda : list(mi())
cin = lambda : int(read())
as0 = ord('0')
as1 = ord('1')
for _ in range(cin()):
	(a, b, n, m) = mi()
	if a + b < n + m:
		print('no')
		continue
	if a > b and b >= m or (a <= b and a >= m):
		print('yes')
	else:
		print('no')


def help():
	(a, b, n, m) = map(int, input().split(' '))
	if a > b:
		t = a - b
		a -= t
		n -= t
	else:
		t = b - a
		b -= t
		n -= t
	if n == m:
		if a >= n and b >= n:
			print('Yes')
		else:
			print('No')
	elif n < m:
		m -= n
		a -= n
		b -= n
		if m > min(a, b):
			print('No')
		else:
			print('Yes')
	else:
		n -= m
		a -= m
		b -= m
		a -= n // 2 + n % 2
		if a < 0:
			print('No')
		else:
			print('Yes')
for _ in range(int(input())):
	help()


def cookie(a, b, n, m):
	if a + b >= n + m and m <= min(a, b):
		return 'Yes'
	else:
		return 'No'
t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	print(cookie(a, b, n, m))


T = int(input())
for _ in range(T):
	ans = 'Yes'
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		ans = 'No'
	elif m > min(a, b):
		ans = 'No'
	print(ans)


t = int(input())
for i in range(t):
	(v, c, n, m) = map(int, input().split())
	if n < m:
		x = n
		f = m
		count = 1
	else:
		x = m
		f = n
		count = 0
	if v > c:
		if count == 1:
			if x <= v and x <= c and (f - x <= c - x):
				print('Yes')
			else:
				print('No')
		elif x <= c and x <= v and (f - x <= v - x + c - x):
			print('Yes')
		else:
			print('No')
	else:
		dif = c - v
		if count == 1:
			if x <= c and x <= v and (f - x <= v - x):
				print('Yes')
			else:
				print('No')
		elif x <= c and x <= v and (f - x <= v - x + c - x):
			print('Yes')
		else:
			print('No')


def solve(a, b, n, m):
	if a + b < n + m:
		print('NO')
		return
	if (a == 0 or b == 0) and m > 0:
		print('NO')
		return
	else:
		if a > b:
			n -= a - b
			a -= a - b
		else:
			n -= b - a
			b -= b - a
		if a >= m or b >= m:
			print('YES')
		else:
			print('NO')
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	solve(a, b, n, m)


from sys import stdin, stdout
import sys
from math import *
for __ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('No')
	elif a <= b:
		if a < m:
			print('No')
		else:
			print('Yes')
	elif b < m:
		print('No')
	else:
		print('Yes')


import math
import sys
import itertools
import random

def lcm(x, y):
	return x * y // math.gcd(x, y)

def hcf(x, y):
	return math.gcd(x, y)

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

def primeFactors(n):
	res = []
	while n % 2 == 0:
		res.append(2)
		n //= 2
	for i in range(3, math.sqrt(n) + 1, 2):
		while n % i == 0:
			res.append(i)
			n //= i
	if n > 2:
		res.append(n)
	return res
for _ in range(0, int(input())):
	(v, c, f, s) = map(int, input().strip().split())
	if v + c < f + s:
		print('NO')
		continue
	elif min(v, c) >= s:
		print('YES')
	else:
		print('NO')


t = int(input())
for case in range(t):
	(a, b, n, m) = map(int, input().split())
	(a, b) = (min(a, b), max(a, b))
	if n + m <= a + b:
		if n >= b - a:
			n = n - b + a
			b = a
			if n >= m:
				print('Yes')
			elif m <= a:
				print('Yes')
			else:
				print('No')
		elif m <= a:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def main():
	(a, b, n, m) = list(map(int, input().split()))
	if n + m > a + b:
		return False
	if a > b:
		res = min(a - b, n)
		n -= res
		a -= res
	else:
		res = min(b - a, n)
		n -= res
		b -= res
	if b == a:
		res = min(n, m)
		n -= res
		m -= res
		a -= res
		b -= res
		if a < 0 or b < 0:
			return false
	if m != 0:
		return min(a, b) >= m
	else:
		return a + b >= n
t = int(input())
for _ in range(t):
	print('YES' if main() else 'NO')


import sys
readline = lambda : sys.stdin.readline().strip('\n')
readlist = lambda : list(map(int, readline().split()))
for i in range(int(input())):
	(a, b, n, m) = readlist()
	if m > min(a, b) or a + b < n + m:
		print('No')
	else:
		print('Yes')
quit()
for i in range(int(input())):
	(n, r) = readlist()
	s = 0
	if n > r:
		print(r * (r + 1) // 2)
	else:
		print(n * (n - 1) // 2 + 1)
for i in range(int(input())):
	n = int(input())
	print(n // 2 + n % 2)
	a = 1


from sys import stdin, stdout
t = int(input())
while t:
	(a, b, n, m) = [int(x) for x in stdin.readline().rstrip().split()]
	angry = False
	cookies = min(n, m)
	n -= cookies
	m -= cookies
	a -= cookies
	b -= cookies
	if a < 0 or b < 0:
		angry = True
	if n == 0:
		if min(a, b) < m:
			angry = True
	if m == 0:
		if a + b < n:
			angry = True
	if angry:
		stdout.write('NO\n')
	else:
		stdout.write('YES\n')
	t -= 1


def main():
	t = int(input())
	for _ in range(t):
		(a, b, n, m) = map(int, input().split())
		if a + b < n + m:
			print('No')
		elif n >= abs(b - a):
			(a, b) = (min(a, b), min(a, b))
			if m > a:
				print('No')
			else:
				print('Yes')
		elif m > min(a, b):
			print('No')
		else:
			print('Yes')
main()


t = int(input())
for i in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	p = 0
	if a + b < n + m:
		print('No')
		p = p + 1
	elif a >= b:
		if b < m:
			print('No')
			p = p + 1
			continue
	elif a <= b:
		if a < m:
			print('No')
			p = p + 1
			continue
	if p == 0:
		print('Yes')


def gotAngry():
	global v, c, n, m
	if n == 0:
		retvalue = m > min(v, c)
		(n, m) = (0, 0)
		return retvalue
	if v == c:
		if m == 0:
			retvalue = n > v + c
			(n, m) = (0, 0)
			return retvalue
		people = min(n, m)
		temp = min(people, c)
		v -= temp
		c -= temp
		n -= temp
		m -= temp
		return False
	dif = abs(v - c)
	temp = min(dif, n)
	n -= temp
	if v > c:
		v -= temp
	else:
		c -= temp
	return False
for _ in range(int(input())):
	global v, c, n, m
	(v, c, n, m) = map(int, input().split())
	if n + m > v + c:
		print('No')
		continue
	printed = False
	while n + m != 0:
		if gotAngry():
			print('No')
			printed = True
			break
	if not printed:
		print('Yes')


from sys import stdin
input = lambda : stdin.readline().strip()
char = [chr(i) for i in range(97, 123)]
CHAR = [chr(i) for i in range(65, 91)]
mp = lambda : list(map(int, input().split()))
INT = lambda : int(input())
rn = lambda : range(INT())
from math import ceil, sqrt, factorial, gcd
for _ in rn():
	(a, b, n, m) = mp()
	ans = 'YES'
	if a > b:
		if m > b:
			ans = 'NO'
		else:
			b -= m
	elif m > a:
		ans = 'NO'
	else:
		a -= m
	if n != 0:
		if a > b:
			k = a - b
			n -= k
			a -= k
			if n < 0:
				a -= n
				n = 0
		else:
			k = b - a
			n -= k
			b -= k
			if n < 0:
				b -= n
				n = 0
	if n != 0:
		ch = n // 2
		n -= 2 * ch
		a -= ch
		b -= ch
		if n % 2 == 1:
			b -= 1
			n -= 1
	if a < 0 or b < 0:
		ans = 'NO'
	print(ans)


import math
t = int(input())
for _ in range(t):
	(a, b, m, n) = map(int, input().split())
	if m + n == 0:
		print('NO')
		continue
	if a + b < m + n:
		print('NO')
		continue
	p = min(a, b)
	if n > p:
		print('NO')
		continue
	else:
		print('YES')


import sys
input = sys.stdin.readline
T = int(input())
for testcase in range(T):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	if min(a, b) >= m:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	if m <= min(a, b):
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
import bisect

def st():
	return list(stdin.readline())

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

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

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

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

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
			n = n - 1
		else:
			a = a * a
			n = n >> 1
	return r

def solve():
	(a, b, n, m) = mp()
	if a + b < n + m:
		pr('NO')
	elif min(a, b) < m:
		pr('NO')
	else:
		pr('YES')
for _ in range(inp()):
	solve()


from sys import stdin, stdout
from bisect import bisect, bisect_left, bisect_right

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

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

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

def gs():
	return stdin.readline()
t = gi()
for _ in range(t):
	(a, b, n, m) = gt()
	if a > b:
		(a, b) = (b, a)
	if a >= m:
		b = b + a - m
		if b >= n:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	if v > c:
		(m, c) = (m - min(m, c), c - min(m, c))
		if m > 0:
			print('No')
			continue
	else:
		(m, v) = (m - min(m, v), v - min(m, v))
		if m > 0:
			print('No')
			continue
	if n > c + v:
		print('No')
		continue
	print('Yes')


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	(a, b, n, m) = mInt()
	if n + m <= a + b and m <= min(a, b):
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	(a, b, n, m) = map(int, input().split())
	c = min(a, b)
	if a + b < n + m or m > c:
		print('NO')
	else:
		print('YES')
	t -= 1


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

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

def solve():
	(a, b, n, m) = rl()
	if a + b < n + m:
		print('NO')
		return
	(l, h) = sorted([a, b])
	if l < m:
		print('NO')
		return
	print('YES')
mode = 'T'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


def func(v, c, first, sec):
	if first + sec > v + c:
		print('NO')
		return
	else:
		minm = 0
		if v > c:
			minm = c
		else:
			minm = v
		if sec <= minm:
			print('YES')
			return
		else:
			print('NO')
			return
t = int(input())
for _ in range(t):
	(vanilla, choc, first, second) = map(int, input().split())
	func(vanilla, choc, first, second)


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('NO')
	else:
		rm2 = m
		rm1 = min(a, b) - (max(a, b) - n)
		if rm1 < 0:
			rm1 = 0
		if rm1 <= min(a, b) * 2 and rm2 <= min(a, b):
			print('YES')
		else:
			print('NO')


production = True
import sys, math, collections

def input(input_format=0, multi=0):
	if multi > 0:
		return [input(input_format) for i in range(multi)]
	else:
		next_line = sys.stdin.readline()[:-1]
		if input_format >= 10:
			use_list = False
			input_format = int(str(input_format)[-1])
		else:
			use_list = True
		if input_format == 0:
			formatted_input = [next_line]
		elif input_format == 1:
			formatted_input = list(map(int, next_line.split()))
		elif input_format == 2:
			formatted_input = list(map(float, next_line.split()))
		elif input_format == 3:
			formatted_input = list(next_line)
		elif input_format == 4:
			formatted_input = list(map(int, list(next_line)))
		elif input_format == 5:
			formatted_input = next_line.split()
		else:
			formatted_input = [next_line]
		return formatted_input if use_list else formatted_input[0]

def out(output_line, output_format=0, newline=True):
	formatted_output = ''
	if output_format == 0:
		formatted_output = str(output_line)
	elif output_format == 1:
		formatted_output = ' '.join(map(str, output_line))
	elif output_format == 2:
		formatted_output = '\n'.join(map(str, output_line))
	print(formatted_output, end='\n' if newline else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c

def mapl(iterable, format=0):
	if format == 0:
		return list(map(int, iterable))
	elif format == 1:
		return list(map(str, iterable))
	elif format == 2:
		return list(map(list, iterable))

def solve():
	(a, b, n, m) = input(1)
	x = min(a, b)
	y = max(a, b)
	u = x + y
	if x < m:
		out('No')
		return
	else:
		u -= m
		out(ter(n > u, 'No', 'Yes'))
	return
for i in range(input(11)):
	solve()


for s in [*open(0)][1:]:
	(a, b, n, m) = map(int, s.split())
	print('YNeos'[a + b < n + m or min(a, b) < m::2])


def func(a, b, f, s):
	if a + b < f + s:
		return 'NO'
	if min(a, b) >= s:
		return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	(a, b, f, s) = list(map(int, input().split()))
	print(func(a, b, f, s))


def main():
	(a, b, n, m) = map(int, input().split(' '))
	if a + b < m + n:
		print('No')
		return
	if a > b:
		m -= b
		if m > 0:
			print('No')
			return
		else:
			print('Yes')
			return
	else:
		m -= a
		if m > 0:
			print('No')
			return
		else:
			print('Yes')
			return
q = int(input())
for blaf in range(q):
	main()


def main():
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
	elif m > min(a, b):
		print('No')
	else:
		print('Yes')
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	u = m <= min(a, b)
	v = m + n <= a + b
	print('Yes' if u and v else 'No')


import io
import os
from collections import Counter, defaultdict, deque
import sys
sys.setrecursionlimit(10 ** 5)

def solve(A, B, N, M):
	if A < 0 or B < 0:
		return False
	if M == 0:
		return A + B >= N
	assert M > 0
	if A > B:
		X = min(M, A - B)
		assert X > 0
		return solve(A, B - X, N, M - X)
	else:
		X = min(M, B - A + 1)
		assert X > 0
		return solve(A - X, B, N, M - X)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(A, B, N, M) = [int(x) for x in input().split()]
	ans = solve(A, B, N, M)
	if ans:
		print('Yes')
	else:
		print('No')


def solve(a, b, n, m):
	if a > b:
		k = a
		a = b
		b = k
	if a < m:
		return False
	if a + b < n + m:
		return False
	return True

def main():
	test_cases = int(input())
	for i in range(test_cases):
		my_str = input()
		my_list = my_str.split(' ')
		a = int(my_list[0])
		b = int(my_list[1])
		n = int(my_list[2])
		m = int(my_list[3])
		flag = solve(a, b, n, m)
		if flag:
			print('Yes')
		else:
			print('No')
main()


import sys
input = sys.stdin.readline
inputr = lambda : sys.stdin.readline().rstrip('\n')
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('No')
		continue
	print('Yes' if m <= min(a, b) else 'No')


for i in range(int(input())):
	l = list(map(int, input().split()))
	print('Yes') if min(l[0], l[1]) >= l[3] and l[0] + l[1] - l[3] >= l[2] else print('No')


import os
import sys
from io import BytesIO, IOBase
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')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	(v, c) = (a, b)
	x = abs(v - c)
	if min(v, c) >= m:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(a, b, n, m) = list(map(int, input().rstrip().split()))
	if n == 0 and m == 0:
		print('Yes')
		continue
	if n == 0:
		if min(a, b) >= m:
			print('Yes')
		else:
			print('No')
		continue
	if m == 0:
		if a + b >= n:
			print('Yes')
		else:
			print('No')
		continue
	if a + b < n + m:
		print('No')
	elif m > min(a, b):
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
for _ in range(inp()):
	(a, b, n, m) = ip()
	if a + b < n + m:
		print('No')
		continue
	no = min(n, m)
	if a < no or b < no:
		print('No')
		continue
	(a, b, n, m) = (a - no, b - no, n - no, m - no)
	if n:
		if a + b >= n:
			print('Yes')
		else:
			print('No')
	elif m:
		if min(a, b) >= m:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	a1 = a + b
	a2 = m + n
	if a1 < a2 or min(a, b) < m:
		print('No')
	else:
		print('Yes')


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	k = min(a, b, c, d)
	(a, b, c, d) = (a - k, b - k, c - k, d - k)
	if c == d == 0:
		print('Yes')
		continue
	if d == 0:
		if a + b >= c:
			print('Yes')
		else:
			print('No')
		continue
	if c == 0:
		if min(a, b) >= d:
			print('Yes')
		else:
			print('No')
		continue
	if a == 0 or b == 0:
		print('No')
		continue


T = int(input())
for t in range(T):
	(a, b, n, m) = [int(i) for i in input().split()]
	if n + m > a + b:
		print('No')
		continue
	if m <= min(a, b):
		print('Yes')
	else:
		print('No')


q = int(input())
for qq in range(q):
	s = input().split()
	a = int(s[0])
	b = int(s[1])
	n = int(s[2])
	m = int(s[3])
	if m <= min(a, b) and m + n <= a + b:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(van, cho, n, m) = map(int, input().split())
	if van > cho:
		cho -= m
	else:
		van -= m
	if cho < 0 or van < 0:
		print('No')
		continue
	if cho + van - n < 0:
		print('No')
		continue
	print('Yes')


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	dmin = min(a, b)
	dmax = max(a, b)
	if dmin < m:
		print('No')
	elif dmin - m + dmax < n:
		print('No')
	else:
		print('Yes')


from collections import defaultdict as dd
import sys
input = sys.stdin.readline
t = int(input())
while t:
	(a, b, n, m) = map(int, input().split())
	lol = 0
	if a + b < n + m:
		lol = 1
	ma = min(a, b)
	if ma < m:
		lol = 1
	if lol:
		print('No')
	else:
		print('Yes')
	t -= 1


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

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

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

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	(a, b, n, m) = inputnums()
	if n + m <= a + b and m <= min(a, b):
		print('Yes')
	else:
		print('No')


import math
for _ in range(int(input())):
	(a, b, v, c) = map(int, input().split())
	if v + c > a + b:
		print('No')
	elif c > min(a, b):
		print('No')
	else:
		print('Yes')


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

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

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

def si():
	return input().split()
t = ii()
for _ in range(t):
	(v, c, n, m) = mi()
	ans = max(v, c) - min(v, c) + m
	if min(v, c) >= m:
		rem = min(v, c) - m
		rem2 = max(v, c) - rem
		if rem2 >= n:
			print('Yes')
		else:
			n -= rem2
			ans = 2 * rem
			if ans >= n:
				print('Yes')
			else:
				print('No')
	else:
		print('No')


import math
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b == 0 and n + m > 0:
		print('No')
	else:
		(a, b) = (max(a, b), min(a, b))
		if b >= m and a + b - m >= n:
			print('Yes')
		else:
			print('No')


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	(a, b, n, m) = map(int, inputi().split())
	if m + n > a + b or m > min(a, b):
		print('No')
	else:
		print('Yes')

def main():
	t = int(inputi())
	for _ in range(t):
		solve()
main()


ll = lambda : list(map(int, input().split()))
st = lambda : input()
v = lambda : map(int, input().split())
ii = lambda : int(input())
from collections import *
from math import *
for _ in range(ii()):
	(a, b, n, m) = v()
	if n + m <= a + b and min(a, b) >= m:
		print('YES')
	else:
		print('NO')


import sys, io, os, time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
input = sys.stdin.readline
for ii in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if m > min(a, b) or a + b < m + n:
		print('NO')
	else:
		print('YES')


def cookie(v, c, fir, sec):
	if sec <= min(v, c) and fir + sec <= v + c:
		return 'YES'
	return 'NO'
t = int(input())
for u in range(t):
	(a, b, c, d) = map(int, input().strip().split())
	print(cookie(a, b, c, d))


from sys import stdin
input = stdin.readline
import bisect
import math
for xoxo in range(1):

	def s(x):
		return (x + 1) * x // 2
	for _ in range(int(input())):
		(n, m, p, q) = map(int, input().split())
		if p + q > n + m:
			print('No')
			continue
		else:
			x = min(n, m)
			if x < q:
				ans = 'No'
			else:
				x = m + n - q
				if x >= p:
					ans = 'Yes'
				else:
					ans = 'No'
			print(ans)


for __ in range(int(input())):
	(a, b, n, m) = list(map(int, input().split()))
	ans = 'yes'
	if m > min(a, b) or n + m > a + b:
		ans = 'no'
	print(ans)


inp = lambda : int(input())
inpm = lambda : map(int, input().split())
inpl = lambda : list(inpm())
l2mn = lambda _n, _m: [[0 for __ in range(_m)] for _ in range(_n)]
l2n = lambda _n: l2mn(_n, _n)
INF = int(1e+18)
MOD = int(1000000000.0) + 7
N = 2000009

def solve():
	(a, b, n, m) = inpm()
	if min(a, b) >= m and a + b >= m + n:
		print('Yes')
	else:
		print('No')

def main():
	t = inp()
	for i in range(t):
		solve()
main()


import os
import sys
from io import BytesIO, IOBase
import heapq as h
from bisect import bisect_left, bisect_right
import time
from types import GeneratorType
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		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 = self.os.read(self._fd, max(self.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 = self.os.read(self._fd, max(self.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:
			self.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')
from collections import defaultdict as dd, deque as dq, Counter as dc
import math, string
start_time = time.time()

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())

def getMat(n):
	return [getInts() for _ in range(n)]

def isInt(s):
	return '0' <= s[0] <= '9'
MOD = 998244353

def solve():
	(A, B, N, M) = getInts()
	if N + M > A + B:
		return 'No'
	if M > min(A, B):
		return 'No'
	return 'Yes'
for _ in range(getInt()):
	print(solve())


import os
import sys
from io import BytesIO, IOBase
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')

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
for _ in range(int(ri())):
	(a, b, n, m) = Ri()
	if a + b < n + m:
		No()
	else:
		dif = abs(a - b)
		if a > b:
			a -= min(dif, n)
		else:
			b -= min(dif, n)
		n -= min(dif, n)
		a -= min(n, m)
		b -= min(n, m)
		temp = min(n, m)
		n -= temp
		m -= temp
		if m == 0:
			Yes()
		elif a > b:
			if m > b:
				No()
			else:
				Yes()
		elif a <= b:
			if m > a:
				No()
			else:
				Yes()


import sys
input = sys.stdin.readline
Q = int(input())
Query = [list(map(int, input().split())) for _ in range(Q)]

def solve(a, b, m, n):
	if a > b:
		d = a - b
		if m < d:
			a -= m
			m = 0
		elif m <= a + b:
			m -= d
			a -= d
		else:
			return False
	else:
		d = b - a
		if m < d:
			b -= m
			m = 0
		elif m <= a + b:
			m -= d
			b -= d
		else:
			return False
	if a != b:
		return min(a, b) >= n
	k = min(m, n)
	if a < k:
		return False
	a -= k
	b -= k
	m -= k
	n -= k
	if m > 0:
		return a + b >= m
	if n > 0:
		return min(a, b) >= n
	return True
for (a, b, m, n) in Query:
	print('Yes' if solve(a, b, m, n) else 'No')


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	(a, b) = (max(a, b), min(a, b))
	z = a - b
	if z >= n:
		if b >= m:
			print('Yes')
		else:
			print('No')
	else:
		n -= z
		c = min(n, m)
		if b >= c:
			b -= c
		else:
			print('No')
			continue
		a = b
		n -= c
		m -= c
		if n:
			if 2 * a >= n:
				print('Yes')
			else:
				print('No')
		elif b >= m:
			print('Yes')
		else:
			print('No')


import sys, os, io

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

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

def ria():
	return list(map(int, sys.stdin.readline().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')
import math, datetime, functools
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(ri()):
		(a, b, n, m) = ria()
		if a + b < n + m or min(a, b) < m:
			ws('NO')
		else:
			ws('YES')
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			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, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			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()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

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

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


for xyz in range(0, int(input())):
	(a, b, m, n) = map(int, input().split())
	(a, b) = (max(a, b), min(a, b))
	if a == 0:
		print('No')
	elif n > b:
		print('No')
	elif b - n + a >= m:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math
from bisect import bisect, bisect_right, bisect_left

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

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

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

def solve():
	(v, c, n, m) = get_tuple()
	if v + c < n + m:
		return 'No'
	return 'Yes' if m <= min(v, c) else 'No'

def main():
	print(solve())
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	print('YNEOS'[a + b < m + n or min(a, b) < m::2])


t = int(input())
for i in range(t):
	(a, b, x, y) = map(int, input().split())
	if y <= min(a, b) and x <= a + b - y:
		print('Yes')
	else:
		print('No')


for tt in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	if v == c == n == m:
		print('Yes')
	elif v + c >= n + m:
		ans = True
		if v > c:
			value = c - m
			if value < 0:
				m = value * -1
				ans = False
			else:
				m = 0
				c = value
				if c + v >= n:
					ans = True
				else:
					ans = False
		else:
			value = v - m
			if value < 0:
				m = value * -1
				ans = False
			else:
				m = 0
				v = value
				if c + v >= n:
					ans = True
				else:
					ans = False
		print('Yes' if ans else 'No')
	else:
		print('No')


import sys, math, os
from io import BytesIO, IOBase
from collections import defaultdict as dd, deque, Counter

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

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
INF = 10 ** 9
mod = 998244353
for t in range(int(data())):
	(a, b, n, m) = mdata()
	if a + b < n + m:
		out('No')
		continue
	if min(a, b) >= m:
		out('Yes')
	else:
		out('No')


def judge(v, c, n, m):
	if n + m > v + c:
		return 'NO'
	else:
		if c != v:
			delta = abs(c - v)
		else:
			delta = 0
		base = (c + v - delta) // 2
		if m > base:
			return 'NO'
		elif n > delta + base + (base - m):
			return 'NO'
		else:
			return 'YES'
t = int(input())
while t > 0:
	(a, b, n, m) = list(map(int, input().split()))
	print(judge(a, b, n, m))
	t = t - 1


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(v, c, n, m) = map(int, input().split())
	result = 'Yes'
	if n + m > v + c:
		result = 'No'
	elif min(v, c) < m:
		result = 'No'
	print(result)


for _ in range(int(input())):
	(vanila, cookie, n, m) = map(int, input().split())
	if vanila + cookie < n + m:
		print('NO')
	elif min(vanila, cookie) >= m:
		print('YES')
	else:
		print('NO')


import sys, math, cmath, time
start_time = time.time()

def solve():
	(a, b, n, m) = invr()
	q = abs(a - b)
	(a, b) = (min(a, b), min(a, b))
	if n > q:
		n = n - q
		if m <= a and n + m <= a + b:
			qq = True
		else:
			qq = False
	elif m <= a:
		qq = True
	else:
		qq = False
	if qq:
		print('Yes')
	else:
		print('No')

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

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

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

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

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

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = (q[ord(a[i]) - 97], 1)
	return q

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


from sys import stdin, stdout
import math
t = int(stdin.readline())
for _ in range(t):
	(v, c, n, m) = map(int, stdin.readline().split())
	if n + m > v + c:
		print('NO')
		continue
	if min(v, c) >= m:
		print('YES')
		continue
	print('NO')


import math
from collections import Counter, deque
L = lambda : list(map(int, input().split()))
M = lambda : map(int, input().split())
I = lambda : int(input())
IN = lambda : input()
mod = 10 ** 9 + 7

def s(a):
	print(' '.join(list(map(str, a))))

def solve():
	(a, b, n, m) = M()
	if a + b < n + m:
		print('NO')
	elif min(a, b) >= m:
		print('YES')
	else:
		print('NO')
for i in range(I()):
	solve()


def main():
	t = Iint()
	for _ in range(t):
		(v, c, t1, t2) = Imap()
		if v + c < t1 + t2:
			print('No')
		elif v > c and c >= t2 or (v <= c and v >= t2):
			print('Yes')
		else:
			print('No')
FIO = 1

def I():
	return input()

def Iint():
	return int(input())

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

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

def Plist(li, s=' '):
	print(s.join(map(str, li)))
en = enumerate
if not FIO:
	if __name__ == '__main__':
		main()
		exit()
else:
	from io import BytesIO, IOBase
	import sys
	import os
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))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for _ in range(t):
	(a, b, n, m) = list(map(int, input().split(' ')))
	lowbiscuit = min(a, b)
	res = True
	if a + b < n + m:
		res = False
	elif m > lowbiscuit:
		res = False
	if res:
		print('Yes')
	else:
		print('No')


def solution(a, b, m, n):
	if a + b < m + n:
		return False
	(a, b) = (min(a, b), max(a, b))
	val = b - m
	if val >= a:
		if a >= n:
			return True
		else:
			return False
	if a >= n:
		return True
	return False
for _ in range(int(input())):
	(a, b, m, n) = map(int, input().split())
	ans = solution(a, b, m, n)
	if ans:
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	t = t - 1
	(x, y, l, m) = map(int, input().split())
	if x + y < l + m:
		print('No')
	else:
		z = min(x, y)
		if z >= m:
			print('Yes')
		else:
			print('No')


t = int(input())
while t > 0:
	t -= 1
	(a, b, n, m) = input().split()
	(a, b, n, m) = (int(a), int(b), int(n), int(m))
	if n + m > a + b:
		print('No')
		continue
	(a, b) = (max(a, b), min(a, b))
	c = max(n - a, 0)
	if b < c + m:
		print('No')
	else:
		print('Yes')


import sys
import math

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

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

def get_string():
	return sys.stdin.readline().strip()
t = int(input())
for test in range(t):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('No')
		continue
	if a > b:
		if b < m:
			print('No')
		else:
			print('Yes')
	elif a < m:
		print('No')
	else:
		print('Yes')


def isNoAngryGuestPossible(nVanilla, nChocolate, nFirstTypeGuests, nSecondTypeGuests):
	if nVanilla > nChocolate:
		(nMoreCookies, nLessCookies) = (nVanilla, nChocolate)
	else:
		(nMoreCookies, nLessCookies) = (nChocolate, nVanilla)
	if nFirstTypeGuests <= nMoreCookies and nSecondTypeGuests <= nLessCookies:
		return 'Yes'
	if nFirstTypeGuests > nMoreCookies and nFirstTypeGuests - nMoreCookies <= nLessCookies - nSecondTypeGuests:
		return 'Yes'
	return 'No'

def testCases_1371c():
	return map(int, input().split(' '))
nTestCases = int(input())
testCases = tuple((testCases_1371c() for x in range(nTestCases)))
tuple((print(isNoAngryGuestPossible(*testCase)) for testCase in testCases))


testcases = int(input())
for testcase in range(testcases):
	temparr = input()
	temparr = temparr.split()
	v = int(temparr[0])
	c = int(temparr[1])
	a = int(temparr[2])
	b = int(temparr[3])
	if v + c < a + b:
		print('No')
		continue
	if v >= b and v <= c:
		print('Yes')
		continue
	if min(v, c) >= b:
		print('Yes')
	else:
		print('No')


def answer(a, b, n, m):
	if a + b >= n + m:
		if min(a, b) >= m:
			return 'YES'
		else:
			return 'NO'
	else:
		return 'NO'
t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	print(answer(a, b, n, m))


for _ in range(int(input())):
	(a, b, n, m) = list(map(int, input().split()))
	if n + m > a + b:
		print('NO')
	else:
		if (a == 0 or b == 0) and m > 0:
			print('NO')
			continue
		if min(a, b) < m:
			print('NO')
			continue
		print('YES')


for _ in range(int(input())):
	(a, b, g1, g2) = map(int, input().split())
	if a + b < g1 + g2:
		print('NO')
	elif min(a, b) < g2:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	val = 0
	x = a
	y = b
	if x == y:
		if x < m:
			val = -1
		else:
			x = x - m
			if x + y < n:
				val = -1
	elif x < y:
		if x < m:
			val = -1
		else:
			x = x - m
			if x + y < n:
				val = -1
	elif y < m:
		val = -1
	else:
		y = y - m
		if x + y < n:
			val = -1
	if val == -1:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	if b > a:
		(a, b) = (b, a)
	if m > b:
		print('No')
	else:
		remain = b - m + a
		if remain >= n:
			print('Yes')
		else:
			print('No')


def solve():
	(a, b, n, m) = list(map(int, input().split()))
	if a + b < n + m:
		print('No')
	elif m > n and min(a, b) >= m:
		print('Yes')
	elif n >= m and min(a, b) >= min(n, m):
		print('Yes')
	else:
		print('No')
t = int(input())
for test in range(t):
	solve()


import sys
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

def solve():
	(a, b, n, m) = I()
	ans = 'Yes'
	if a + b < n + m or (m and (not min(a, b))):
		ans = 'No'
	if m and min(a, b) < m:
		ans = 'No'
	print(ans)
(t,) = I()
while t:
	t -= 1
	solve()


from collections import defaultdict
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('No')
	elif a <= b:
		if m <= a:
			print('Yes')
		else:
			print('No')
	elif m <= b:
		print('Yes')
	else:
		print('No')


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return len(set(factors))

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def printp(p):
	for i in p:
		print(i)
MOD = 10 ** 9 + 7
T = 1
T = int(stdin.readline())
for _ in range(T):
	(a, b, n, m) = list(map(int, stdin.readline().split()))
	if a + b < m + n:
		print('No')
		continue
	if m > min(a, b):
		print('No')
		continue
	print('Yes')


from math import floor, ceil
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
	elif m <= min(a, b):
		print('Yes')
	else:
		print('No')


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a > b:
		p = min(a, b, n, m)
		a -= p
		b -= p
		n -= p
		m -= p
		if b == 0:
			if m == 0 and a >= n:
				print('Yes')
			else:
				print('No')
		elif n == 0:
			if b >= m:
				print('Yes')
			else:
				print('No')
		elif m == 0:
			if a + b >= n:
				print('Yes')
			else:
				print('No')
	else:
		p = min(a, b, n, m)
		a -= p
		b -= p
		n -= p
		m -= p
		if a == 0:
			if m == 0 and b >= n:
				print('Yes')
			else:
				print('No')
		elif n == 0:
			if a >= m:
				print('Yes')
			else:
				print('No')
		elif m == 0:
			if a + b >= n:
				print('Yes')
			else:
				print('No')


t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	if a != b:
		c1 = max(a, b)
		c2 = min(a, b)
		if c1 - c2 <= n:
			n -= c1 - c2
			a = c2
			b = c2
		else:
			a = c1 - n
			n = 0
			b = c2
	if min(a, b) >= m:
		if n + m <= a + b:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	(a, b, f, s) = map(int, input().split())
	if a + b >= f + s and s <= min(a, b):
		print('Yes')
	else:
		print('No')


from fractions import Fraction
import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
import statistics
from statistics import mode
from functools import reduce
mod = 1000000007

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

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

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

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def most_frequent(List):
	occurence_count = Counter(List)
	return occurence_count.most_common(1)[0][0]

def most_common(List):
	return mode(List)

def chinese_remainder(a, p):
	prod = reduce(op.mul, p, 1)
	x = [prod // pi for pi in p]
	return sum((a[i] * pow(x[i], p[i] - 2, p[i]) * x[i] for i in range(len(a)))) % prod

def createMatrix(rowCount, colCount, dataList):
	mat = []
	for i in range(rowCount):
		rowList = []
		for j in range(colCount):
			if dataList[j] not in mat:
				rowList.append(dataList[j])
		mat.append(rowList)
	return mat

def isprime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
import collections

def minimalFilps1(bits):
	n = len(bits)
	flipsFromLeft = [0 for i in range(n)]
	flipsFromRight = [0 for i in range(n)]
	flips = 0
	for i in range(0, n, 1):
		if bits[i] == '1':
			flips = flips + 1
		flipsFromLeft[i] = flips
	flips = 0
	i = n - 1
	while i >= 0:
		if bits[i] == '0':
			flips = flips + 1
		i = i - 1
		flipsFromRight[i] = flips
	minFlips1 = sys.maxsize
	for i in range(1, n, 1):
		if flipsFromLeft[i - 1] + flipsFromRight[i] < minFlips1:
			minFlips1 = flipsFromLeft[i - 1] + flipsFromRight[i]
	return minFlips1

def minimalFilps(bits):
	n = len(bits)
	flipsFromLeft = [0 for i in range(n)]
	flipsFromRight = [0 for i in range(n)]
	flips = 0
	for i in range(0, n, 1):
		if bits[i] == '0':
			flips = flips + 1
		flipsFromLeft[i] = flips
	flips = 0
	i = n - 1
	while i >= 0:
		if bits[i] == '1':
			flips = flips + 1
		i = i - 1
		flipsFromRight[i] = flips
	minFlips = sys.maxsize
	for i in range(1, n, 1):
		if flipsFromLeft[i - 1] + flipsFromRight[i] < minFlips:
			minFlips = flipsFromLeft[i - 1] + flipsFromRight[i]
	return minFlips

def oddn(n):
	for i in range(2, n + 1):
		if i % 2 != 0 and n % i == 0:
			return i
	return 3

def memoized(*args):
	if args in stored_results:
		return stored_results[args]
	else:
		result = stored_results[args] = fn(*args)
		return result
	return memoized
open_list = ['(']
close_list = [')']

def check(myStr):
	stack = []
	e = 0
	for i in myStr:
		if i in open_list:
			stack.append(i)
		elif i in close_list:
			pos = close_list.index(i)
			if len(stack) > 0:
				stack.pop()
				e += 1
	return e
for i in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < m + n:
		print('NO')
	elif a > b:
		b = b - m
		a = a - n
		if b >= 0:
			print('YES')
		else:
			print('NO')
	elif a - m >= 0:
		print('YES')
	else:
		print('NO')
import operator
open_list = ['(']
close_list = [')']

def check(myStr):
	stack = []
	e = 0
	for i in myStr:
		if i in open_list:
			stack.append(i)
		elif i in close_list:
			pos = close_list.index(i)
			if len(stack) > 0:
				stack.pop()
				e += 1
	return e


t = int(input())
for _ in range(t):
	l = input().split()
	(a, b, n, m) = (int(l[0]), int(l[1]), int(l[2]), int(l[3]))
	if a + b < n + m:
		print('No')
	else:
		mn = min(m, n)
		ab = min(a, b)
		mab = max(a, b)
		if ab >= m:
			print('Yes')
		else:
			print('No')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	(f1, f2) = (0, 0)
	if a + b < n + m:
		print('No')
		continue
	if a <= b:
		if a < m:
			f1 = 0
		else:
			f1 = 1
	elif a > b:
		if m > b:
			f1 = 0
		else:
			f1 = 1
	if f1 or f2 == 1:
		print('Yes')
	else:
		print('No')


import sys

def answer(a, b, n, m):
	if n + m > a + b:
		return 'No'
	mn = min(a, b)
	mx = max(a, b)
	if m <= mn:
		return 'Yes'
	return 'No'

def main():
	t = int(input())
	while t:
		(a, b, n, m) = [int(i) for i in sys.stdin.readline().split()]
		print(answer(a, b, n, m))
		t -= 1
	return
main()


t = int(input())
for _ in range(t):
	(a, b, n, m) = [int(x) for x in input().split()]
	if a + b >= n + m:
		if m <= min(a, b):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	if min(v, c) >= m and n + m <= v + c:
		print('Yes')
	else:
		print('no')


t = int(input())

def primes(n):
	count = 0
	rl = 0
	while n % 2 == 0:
		n = n // 2
		count += 1
	while n % 3 == 0:
		n = n // 3
		rl += 1
	if n != 1 or count > rl:
		return -1
	else:
		return [rl, count]
from math import *
for xy in range(t):
	(a, b, n, m) = [int(x) for x in input().split()]
	if a + b < m + n:
		print('no')
		continue
	if m <= min(a, b):
		print('yes')
	else:
		print('no')


from sys import stdin

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()))
t = iinput()
while t:
	t -= 1
	(a, b, n, m) = minput()
	if a + b >= n + m and min(a, b) >= m:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi
import heapq

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

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

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

def main():
	try:
		(a, b, n, m) = In()
		if a > b:
			(a, b) = (b, a)
		if a < m:
			no()
		elif n + m <= a + b:
			yes()
		else:
			no()
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


import functools

@functools.lru_cache(maxsize=100000)
def brute(a, b, n, m):
	if n == 0 and m == 0 and (a >= 0) and (b >= 0):
		return True
	if n < 0 or m < 0 or a < 0 or (b < 0):
		return False
	if a > b:
		if brute(a - 1, b, n - 1, m) or brute(a, b - 1, n, m - 1):
			return True
	elif brute(a, b - 1, n - 1, m) or brute(a - 1, b, n, m - 1):
		return True
	return False

def fast(a, b, n, m):
	minVal = min(a, b)
	return n + m <= a + b and m <= minVal

def main():
	t = int(input())
	for _ in range(t):
		(a, b, n, m) = [int(x) for x in input().split()]
		result = fast(a, b, n, m)
		if result == True:
			print('Yes')
		else:
			print('No')

def test():
	(a, b, n, m) = (0, 100, 0, 1)
	b = brute(a, b, n, m)
	print(b)
main()


m = int(input())
for i in range(m):
	(p, q, r, s) = map(int, input().split())
	if p + q < r + s or min(p, q) < s:
		print('No')
	else:
		print('Yes')


import sys
import math
import collections
from sys import stdin, stdout, setrecursionlimit
import bisect as bs
setrecursionlimit(2 ** 20)
M = 10 ** 9 + 7
T = int(stdin.readline())
for _ in range(T):
	(A, B, m, n) = list(map(int, stdin.readline().split()))
	a = max(A, B)
	b = min(A, B)
	if a + b < m + n:
		print('No')
		continue
	if n > b:
		print('No')
		continue
	m -= a - b
	a = b
	b -= n
	if m <= a + b:
		print('Yes')
	else:
		print('No')


from sys import stdin
from math import ceil
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(a, b, n, m) = [int(x) for x in inp().split()]
	if a + b < n + m or m > min(a, b):
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(a, b, n, m) = [int(__) for __ in input().split()]
	(x, y) = (0, 0)
	if a > b:
		y = b
		x = a
	else:
		y = a
		x = b
	if y < m:
		print('No')
	else:
		y -= m
		if x + y < n:
			print('No')
		else:
			print('Yes')


def checker(a, b, n, m):
	if a > b:
		(a, b) = (b, a)
	if a < m:
		return 'No'
	if a + b < n + m:
		return 'No'
	return 'Yes'
for _ in range(int(input())):
	(A, B, N, M) = [int(i) for i in input().split()]
	print(checker(A, B, N, M))


R1 = lambda : list(map(int, input().split()))
R2 = lambda : int(input())
for _ in range(R2()):
	(a, b, n, m) = R1()
	res = 'Yes'
	if m > min(a, b) or n + m > a + b:
		res = 'No'
	print(res)


cases = int(input())
for i in range(cases):
	l1 = input().split(' ')
	a = int(l1[0])
	b = int(l1[1])
	n = int(l1[2])
	m = int(l1[3])
	if a + b < m + n:
		print('NO')
	elif m <= min(a, b):
		print('YES')
	else:
		print('NO')


t = int(input())

def f(x):
	return x * (x + 1) // 2
for i in range(t):
	(a, b, n, m) = [int(x) for x in input().split()]
	if min(a, b) < m or n + m > a + b:
		print('No')
	else:
		print('Yes')


import sys
f_in = sys.stdin
f_out = sys.stdout
n = int(f_in.readline())
for i in range(n):
	number = f_in.readline().split()
	a = int(number[0])
	b = int(number[1])
	n = int(number[2])
	m = int(number[3])
	if a + b < m + n:
		f_out.writelines('No\n')
	else:
		t = min(a, b)
		if t < m:
			f_out.writelines('No\n')
		else:
			f_out.writelines('Yes\n')


t = int(input())
while t:
	t = t - 1
	(a, b, n, m) = map(int, input().split())
	if a < b:
		minn = a
	else:
		minn = b
	if n + m > a + b:
		print('No')
	elif minn < m:
		print('No')
	else:
		print('Yes')


import os, io
from sys import stdout
import collections
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
from collections import Counter

def primes(n):
	sieve = [True] * n
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i]:
			sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
	return [2] + [i for i in range(3, n, 2) if sieve[i]]

def binomial_coefficient(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def powerOfK(k, max):
	if k == 1:
		return [1]
	if k == -1:
		return [-1, 1]
	result = []
	n = 1
	while n <= max:
		result.append(n)
		n *= k
	return result

def prefixSum(arr):
	for i in range(1, len(arr)):
		arr[i] = arr[i] + arr[i - 1]
	return arr

def divisors(n):
	i = 1
	result = []
	while i * i <= n:
		if n % i == 0:
			if n / i == i:
				result.append(i)
			else:
				result.append(i)
				result.append(n / i)
		i += 1
	return result

def kadane(a, size):
	max_so_far = 0
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def digitsSum(n):
	if n == 0:
		return 0
	r = 0
	while n > 0:
		r += n % 10
		n //= 10
	return r
t = int(input())
for _ in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	if m == 0:
		if n <= a + b:
			print('Yes')
		else:
			print('No')
	elif n == 0:
		if m <= min(a, b):
			print('Yes')
		else:
			print('No')
	elif a == 0 or b == 0:
		print('No')
	elif m > min(a, b):
		print('No')
	elif n <= a + b - m:
		print('Yes')
	else:
		print('No')


from sys import *
input = stdin.readline
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	ch = 1
	if a + b < n + m:
		ch = 0
	if min(a, b) < m:
		ch = 0
	if ch == 1:
		stdout.write('Yes\n')
	else:
		stdout.write('No\n')


import sys

class IoTool:
	DEBUG = 0

	def _reader_dbg():
		with open('./input.txt', 'r') as f:
			lines = f.readlines()
		return iter(lines)
	reader = _reader_dbg() if DEBUG else iter(sys.stdin.read().split('\n'))
input = lambda : next(IoTool.reader)

def main():
	t = int(input())
	for _ in range(t):
		(a, b, n, m) = map(int, input().split())
		if a + b >= n + m and min(a, b) >= m:
			print('Yes')
		else:
			print('No')
main()


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	ans = True
	aa = a
	bb = b
	a = min(aa, bb)
	b = max(aa, bb)
	if m > a:
		print('No')
		continue
	if m + n > a + b:
		print('No')
		continue
	print('Yes')


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
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')

def value():
	return tuple(map(int, input().split()))

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

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	(v, c, n, m) = value()
	ans = 'YES'
	if v + c < m + n:
		ans = 'NO'
	if min(v, c) < m:
		ans = 'NO'
	print(ans)


def read_int():
	return int(input())

def read_ints():
	return map(int, input().split(' '))
t = read_int()
for case_num in range(t):
	(a, b, n, m) = read_ints()
	if m <= min(a, b):
		print('Yes' if n + m <= a + b else 'No')
		continue
	if a > b:
		eat = min(n, a - b)
		n -= eat
		a -= eat
	elif a < b:
		eat = min(n, b - a)
		n -= eat
		b -= eat
	if n > 0:
		b -= (n + 1) // 2
		a -= n // 2
	print('Yes' if m <= min(a, b) else 'No')


import collections as cc
import itertools as it
import bisect as bi
I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(a, b, n, m) = I()
	ans = 'Yes'
	if a + b < n + m:
		ans = 'No'
	if min(a, b) < m:
		ans = 'No'
	print(ans)


list_ans = []
for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	if n + m > v + c or m > min(v, c):
		list_ans.append('No')
	else:
		list_ans.append('Yes')
for item in list_ans:
	print(item)


def cookie(a, b, n, m):
	if a + b < n + m:
		return 'NO'
	if a == 0 or b == 0:
		if m == 0 and n <= abs(a - b):
			return 'YES'
		return 'NO'
	if a == b:
		if m > a:
			return 'NO'
		return 'YES'
	if a > b or b > a:
		if m > min(a, b):
			return 'NO'
		return 'YES'
t = int(input())
for i in range(t):
	(a, b, n, m) = [int(j) for j in input().split()]
	print(cookie(a, b, n, m))


from collections import deque
import os
import sys
from io import BytesIO, IOBase
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')
from bisect import bisect_left as bl
from math import log2, ceil
from itertools import permutations

def main():
	for t in range(int(input())):
		(a, b, n, m) = [int(j) for j in input().split()]
		(a, b) = (min(a, b), max(a, b))
		if m > a:
			print('No')
		elif a + b < n + m:
			print('No')
		else:
			print('Yes')
main()


def Solve(n):
	if a + b < n + m or min(a, b) < m:
		return 'No'
	return 'Yes'
T = int(input())
for _ in range(T):
	(a, b, n, m) = map(int, input().split())
	print(Solve(n))


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a > b:
		(a, b) = (b, a)
	x = a - m
	y = b - n + max(x, 0)
	if x >= 0 and y >= 0:
		print('YES')
	else:
		print('NO')


import math
from heapq import heappush, heappop, heapify
import random
import string
from collections import deque, defaultdict
from bisect import bisect, bisect_left, bisect_right, insort
import sys
input = sys.stdin.readline
S = lambda : input().rstrip()
I = lambda : int(S())
M = lambda : map(int, S().split())
L = lambda : list(M())
mod1 = 1000000000 + 7
mod2 = 998244353
for _ in range(I()):
	(a, b, n, m) = M()
	if a + b < n + m or min(a, b) < m:
		print('No')
		continue
	print('Yes')


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
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 print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from math import sqrt, floor, factorial, gcd, log
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
from math import gcd
from bisect import bisect
input = lambda : sys.stdin.readline().rstrip('\r\n')
read = lambda : list(map(int, input().strip().split(' ')))

def solve():
	for _ in range(int(input())):
		(a, b, n, m) = read()
		if a + b < m + n:
			print('NO')
			continue
		if min([a, b]) >= m:
			print('YES')
		else:
			print('NO')
solve()


from sys import stdin
t = int(stdin.readline().strip())
for i in range(t):
	(a, b, n, m) = list(map(int, stdin.readline().strip().split(' ')))
	if m <= min(a, b) and a + b >= n + m:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7
for _ in range(I()):
	(a, b, n, m) = R()
	print('Yes' if a + b >= n + m and min(a, b) >= m else 'No')


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('NO')
	elif m == 0:
		print('YES')
	elif a > b and m <= b:
		print('YES')
	elif a > b and m > b:
		print('NO')
	elif a <= b and m <= a:
		print('YES')
	elif a <= b and m > a:
		print('NO')


for _ in range(int(input())):
	(a, b, n, m) = map(int, input().strip().split())
	small = min(a, b)
	if a + b < n + m:
		print('No')
	elif m > small:
		print('No')
	else:
		print('Yes')


from sys import stdin
number = int(stdin.readline().strip('\n'))
for j in range(number):
	arr = [int(value) for value in stdin.readline().strip('\n').split()]
	a = arr[0]
	b = arr[1]
	n = arr[2]
	m = arr[3]
	if not a == b:
		diff = a - b if a - b > 0 else b - a
		if diff > n:
			diff = n
			n = 0
		else:
			n -= diff
		if a > b:
			a -= diff
		else:
			b -= diff
	if min(a, b) < m:
		print('NO')
	elif a + b - m < n:
		print('NO')
	else:
		print('YES')


for j in range(int(input())):
	(nn, mm, aa, bb) = map(int, input().split())
	if nn + mm == 0:
		print('No')
	elif nn >= bb and mm >= bb and (nn + mm >= aa + bb):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(van, choco, f0r, opp) = map(int, input().split())
	if van + choco < f0r + opp:
		print('No')
	else:
		minim = min(van, choco)
		if opp <= minim:
			print('Yes')
		else:
			f0r -= van + choco - 2 * minim
			print('Yes' if f0r >= opp else 'No')


import sys
from math import ceil
input = sys.stdin.readline

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

def prog():
	for _ in range(int(input())):
		(a, b, n, m) = map(int, input().split())
		if n + m > a + b:
			print('No')
		elif a > b:
			extra = a - b
			if extra >= n:
				if m > b:
					print('No')
				else:
					print('Yes')
			elif m > b:
				print('No')
			else:
				print('Yes')
		else:
			extra = b - a
			if extra >= n:
				if m > a:
					print('No')
				else:
					print('Yes')
			elif m > a:
				print('No')
			else:
				print('Yes')
prog()


def f(a, b, n, m):
	if a > b:
		if n < a - b:
			if b < m:
				return False
			else:
				return True
		else:
			n = n - (a - b)
			a = b
			if m >= n:
				if b >= n and a >= m:
					return True
				else:
					return False
			elif b >= m:
				if n <= a + b - m:
					return True
				else:
					return False
			else:
				return False
	if a == b:
		if m >= n:
			if b >= n and a >= m:
				return True
			else:
				return False
		elif b >= m:
			if n <= a + b - m:
				return True
			else:
				return False
		else:
			return False
	if b > a:
		if n < b - a:
			if a < m:
				return False
			else:
				return True
		else:
			n = n - (b - a)
			b = a
			if m >= n:
				if b >= n and a >= m:
					return True
				else:
					return False
			elif b >= m:
				if n <= a + b - m:
					return True
				else:
					return False
			else:
				return False
for tc in range(int(input())):
	al = list(map(int, input().split()))
	if f(al[0], al[1], al[2], al[3]):
		print('Yes')
	else:
		print('No')


import math
t = int(input())
for q in range(t):
	(a, b, n, m) = map(int, input().split())
	if b > a:
		(a, b) = (b, a)
	if m > b:
		print('No')
	elif a + b - m < n:
		print('No')
	else:
		print('Yes')


import sys
INF = 10 ** 18
MOD = 10 ** 9 + 7
input = lambda : sys.stdin.readline().rstrip()
YesNo = lambda b: bool([print('Yes')] if b else print('No'))
YESNO = lambda b: bool([print('YES')] if b else print('NO'))
int1 = lambda x: int(x) - 1
T = int(input())
for _ in range(T):
	(a, b, n, m) = map(int, input().split())
	if m > min(a, b) or n + m > a + b:
		print('No')
	else:
		print('Yes')


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

def print_list(l):
	print(' '.join(map(str, l)))
N = int(input())
for _ in range(N):
	(a, b, n, m) = read_list()
	if a + b < n + m:
		print('No')
	elif min(a, b) >= m:
		print('Yes')
	else:
		print('No')


def main():
	for _ in range(int(input())):
		(a, b, n, m) = map(int, input().split())
		(a, b) = (max(a, b), min(a, b))
		if b >= m:
			if b - m + a >= n:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
main()


import math
import collections
t = int(input())
import math
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('No')
		continue
	small = a if a < b else b
	big = b if small == a else a
	if small < m:
		print('No')
		continue
	print('Yes')


t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().strip().split(' '))
	if m + n > a + b:
		print('no')
	elif min(a, b) < m:
		print('no')
	else:
		print('yes')


import sys
input = sys.stdin.buffer.readline
import os
from math import *
t = int(input())
while t:
	t -= 1
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
	elif m <= min(a, b):
		print('Yes')
	else:
		print('No')


for z in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	p = 'Yes'
	(a, b) = (min(a, b), max(a, b))
	if a >= m and b + a - m >= n:
		p = 'Yes'
	else:
		p = 'No'
	print(p)


from math import ceil, log, floor, sqrt
import math

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result

def find_k(x, y, n):
	return (n - y) // x * x + y

def count_sticks(n):
	if n % 2 == 0:
		return n // 2
	return n // 2 + 1

def get_types(n, r):
	if r < n:
		return r * (r + 1) // 2
	r = n - 1
	return r * (r + 1) // 2 + 1

def happy_guests(a, b, n, m):
	mn = min(n, m)
	a -= mn
	b -= mn
	n -= mn
	m -= mn
	if a < 0 or b < 0:
		return False
	if n > 0:
		return a + b >= n
	return min(a, b) >= m
t = 1
t = int(input())
while t:
	t = t - 1
	(a, b, n, m) = map(int, input().split())
	if happy_guests(a, b, n, m):
		print('Yes')
	else:
		print('No')


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

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

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

def invr():
	return map(int, input().split())
n = inp()
for i in range(n):
	l = inlt()
	a = l[0]
	b = l[1]
	n = l[2]
	m = l[3]
	if a + b < n + m:
		print('No')
	elif (a == 0 or b == 0) and m != 0:
		print('No')
	elif m > min(a, b):
		print('No')
	else:
		print('Yes')


import sys
lines = sys.stdin.readlines()
T = int(lines[0].strip())
for t in range(T):
	(a, b, n, m) = map(int, lines[t + 1].strip().split(' '))
	res = True
	if n + m > a + b:
		res = False
	elif m > min(a, b):
		res = False
	if res:
		print('Yes')
	else:
		print('No')


from sys import stdin, setrecursionlimit, stdout
setrecursionlimit(1000000)
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
from heapq import heapify, heappop, heappush, heappushpop, heapreplace

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

def fi():
	return float(stdin.readline())

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

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

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

def lsi():
	return list(si())
res = ['YES', 'NO']
test_case = ii()
while test_case:
	test_case -= 1
	(a, b, n, m) = mi()
	f = 1
	if n + m <= a + b and m <= min(a, b):
		f = 0
	print(res[f])


import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)
from collections import defaultdict
con = 10 ** 9 + 7
INF = float('inf')

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

def main():
	N = int(input())
	for _ in range(N):
		(a, b, N, M) = getlist()
		ans = 'Yes'
		if a + b < N + M:
			ans = 'No'
		if a > b:
			b -= M
		else:
			a -= M
		if a < 0 or b < 0:
			ans = 'No'
		print(ans)
main()


import sys

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

def iinput():
	return int(input())

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

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7
for _ in range(iinput()):
	(a, b, n, m) = rinput()
	if m <= min(a, b) and a + b >= m + n:
		print('YES')
	else:
		print('NO')


def ques3(a, b, n, m):
	if a + b < n + m:
		print('NO')
		return
	if a >= m and b >= m and (a + b >= n + m):
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	(a, b, n, m) = [int(i) for i in input().split()]
	ans = ques3(a, b, n, m)
	ans


t = int(input())
for _ in range(t):
	(a, b, n, m) = [int(i) for i in input().split()]
	if a <= b:
		if a < m:
			print('NO')
			continue
		if a - m + b < n:
			print('NO')
			continue
		print('YES')
	else:
		if b < m:
			print('NO')
			continue
		if b - m + a < n:
			print('NO')
			continue
		print('YES')


def solve(v, c, t1, t2):
	if v + c < t1 + t2:
		return 'No'
	else:
		if t2 > min(v, c):
			return 'No'
		return 'Yes'
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().strip().split())
	print(solve(a, b, n, m))


for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	yo = True
	if m > v or m > c:
		yo = False
	else:
		a = min(v, c)
		b = max(v, c)
		a -= m
		if n > a + b:
			yo = False
	if yo:
		print('Yes')
	else:
		print('No')


import math
t = int(input())
for _ in range(t):
	line = input().strip().split(' ')
	(v, c, g1, g2) = (int(line[0]), int(line[1]), int(line[2]), int(line[3]))
	if v + c == 0:
		print('No')
	elif v + c < g1 + g2:
		print('No')
	elif v == 0 and g2 > 0:
		print('No')
	elif c == 0 and g2 > 0:
		print('No')
	elif min(v, c) >= g2:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
t = int(input())
for test in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	minim = min(a, b)
	maxm = max(a, b)
	if n + m > a + b:
		print('No')
	elif m > minim:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('NO')
	else:
		(l, s) = (max(a, b), min(a, b))
		if s >= m:
			print('YES')
		else:
			print('NO')


from sys import stdin

def inp():
	return stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(a, b, n, m) = [int(x) for x in inp().split()]
	if n + m > a + b:
		print('No')
	elif m <= min(a, b):
		print('Yes')
	else:
		print('No')


import sys
import math
import heapq
from collections import defaultdict, deque
input = sys.stdin.readline

def r():
	return int(input())

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

def rl():
	return list(map(int, input().split()))
for _ in range(r()):
	(a, b, n, m) = rm()
	if a + b == 0:
		print('NO')
	elif min(a, b) < m:
		print('NO')
	elif a + b >= n + m:
		print('YES')
	else:
		print('NO')


r = int(input())
for i in range(r):
	st = input().split(' ')
	(a, b, n, m) = (int(st[0]), int(st[1]), int(st[2]), int(st[3]))
	if a + b >= n + m and m <= min(a, b):
		print('YES')
	else:
		print('NO')


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

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

def sarr():
	return [int(i) for i in input()]

def inn():
	return int(input())
mo = 1000000007
for _ in range(inn()):
	(a, b, n, m) = value()
	if a + b < n + m:
		print('NO')
	elif min(a, b) > m:
		print('YES')
	elif min(a, b) < m:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(v, c, n, m) = map(int, input().split())
	cdiff = abs(v - c)
	pdiff = abs(n - m)
	if v + c < n + m:
		print('no')
	elif min(v, c) >= m:
		print('yes')
	else:
		print('no')


for t in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	flag = True
	(a, b) = (max(a, b), min(a, b))
	if m > b:
		flag = False
	else:
		x = b - m
		if n > a - b + 2 * x + (b - x):
			flag = False
	if flag:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout

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

def ans(a, b, n, m):
	if m > min(a, b):
		return 'No'
	if n + m > a + b:
		return 'No'
	return 'Yes'
T = int(input())
for _ in range(T):
	(a, b, n, m) = input().split(' ')
	a = int(a)
	b = int(b)
	n = int(n)
	m = int(m)
	print(ans(a, b, n, m))


def cookie(a, b, n, m):
	type2 = False
	type1 = False
	if b > a:
		if m <= a:
			type2 = True
		if a - m + b >= n:
			type1 = True
	elif a > b:
		if m <= b:
			type2 = True
		if b - m + a >= n:
			type1 = True
	elif a == b:
		if a >= m:
			type2 = True
		if a - m + b >= n:
			type1 = True
	if type1 and type2:
		print('Yes')
		return
	else:
		print('No')
		return
t = int(input())
a = []
for i in range(t):
	a.append(list(map(int, input().split(' '))))
for x in a:
	cookie(*x)


import math
t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	f = 0
	if m > min(a, b):
		f = 1
		print('No')
		continue
	if a > b:
		b -= m
	else:
		a -= m
	if n <= a + b:
		print('Yes')
	else:
		print('No')


import sys
from collections import defaultdict, deque, Counter
import math
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
getS = lambda : input().strip()
getN = lambda : int(input())
getList = lambda : list(map(int, input().split()))
getZList = lambda : [int(x) - 1 for x in input().split()]
INF = 10 ** 20
MOD = 10 ** 9 + 7
divide = lambda x: pow(x, MOD - 2, MOD)

def era(n):
	ret = [1 for i in range(n + 2)]
	for i in range(2, int(math.sqrt(n) + 3)):
		if ret[i] != 0:
			for j in range(2, n // i + 1):
				ret[i * j] = 0
	rret = []
	for (i, r) in enumerate(ret):
		if r == 1 and i != 0:
			rret.append(i)
	return rret

def houjyo(n, m, k, kaijyo):
	if k == n:
		return 1
	else:
		ret = nck(n, k, kaijyo) * npk(m - k, n - k, kaijyo)
		return ret % MOD

def nck(n, k, kaijyo):
	return npk(n, k, kaijyo) * divide(kaijyo[k]) % MOD

def npk(n, k, kaijyo):
	if k == 0 or k == n:
		return n % MOD
	return kaijyo[n] * divide(kaijyo[n - k]) % MOD

def kaijyo(n):
	ret = [1]
	for i in range(1, n + 1):
		ret.append(ret[-1] * i % MOD)
	return ret

def solve():
	(a, b, c, d) = getList()
	if d > min(a, b) or sum([a, b]) < sum([c, d]):
		print('No')
		return
	else:
		print('Yes')
		return

def main():
	n = getN()
	for _ in range(n):
		solve()
main()


def f():
	(v, c, more, less) = [int(s) for s in input().split()]
	if v + c < more + less:
		print('No')
		return
	m = min(v, c)
	if m < less:
		print('No')
		return
	print('Yes')
for t in range(int(input())):
	f()


from sys import stdin, stdout

def main():
	t = int(stdin.readline())
	for _ in range(t):
		(v, c, n, m) = map(int, stdin.readline().split())
		if v + c < n + m:
			ans = 'No'
		elif v > c:
			if c >= m:
				ans = 'Yes'
			else:
				ans = 'No'
		elif v >= m:
			ans = 'Yes'
		else:
			ans = 'No'
		stdout.write(ans)
		stdout.write('\n')
	return
main()


from sys import stdin, stdout
int_in = lambda : int(stdin.readline())
arr_in = lambda : [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for _ in range(rows)]
str_in = lambda : stdin.readline().strip()
out = lambda o: stdout.write('{}\n'.format(o))
arr_out = lambda o: out(' '.join(map(str, o)))
bool_out = lambda o: out('YES' if o else 'NO')
tests = lambda : range(1, int_in() + 1)
case_out = lambda i, o: out('Case #{}: {}'.format(i, o))

def solve(a, b, n, m):
	if min(a, b) < m:
		return False
	if a + b < n + m:
		return False
	return True
for _ in tests():
	(a, b, n, m) = arr_in()
	bool_out(solve(a, b, n, m))


t = int(input())
for tt in range(t):
	(a, b, n, m) = [int(x) for x in input().split(' ')]
	if min(a, b) < m:
		print('No')
	elif min(a, b) == m:
		if max(a, b) >= n:
			print('Yes')
		else:
			print('No')
	elif a + b >= n + m:
		print('Yes')
	else:
		print('No')


import math
t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	if a < b:
		(a, b) = (b, a)
	b -= m
	ans = 1
	if b < 0:
		ans = 0
	if a + b < n:
		ans = 0
	if ans:
		print('YES')
	else:
		print('NO')


input = __import__('sys').stdin.readline
for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	ext = abs(v - c)
	if ext <= n:
		n -= ext
		if v > c:
			v = c
		else:
			c = v
	else:
		if v > c:
			v = c + ext - n
		else:
			c = v + ext - n
		n = 0
	if v == c and n + m <= v + c and (m <= c):
		print('Yes')
	elif v != c and m <= min(v, c):
		print('Yes')
	else:
		print('No')


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

def readn():
	return int(input())
for _ in range(readn()):
	(a, b, n, m) = readintlst()
	if m <= min(a, b) and n + m <= a + b:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, m, k, r) = map(int, input().split())
	if min(n, m) >= r and n + m >= k + r:
		print('Yes')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	(a, b, n, m) = input().split()
	(a, b, n, m) = (int(a), int(b), int(n), int(m))
	ans = False
	if a + b < m + n:
		ans = False
	elif min(a, b) < m:
		ans = False
	else:
		ans = True
	if ans:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if a + b >= c + d and min(a, b) >= d:
		print('Yes')
	else:
		print('No')


import sys
import math
from collections import defaultdict, Counter
input = sys.stdin.readline

def print(x):
	sys.stdout.write(str(x) + '\n')
t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
	elif a < b:
		if a >= m:
			print('Yes')
		else:
			print('No')
	elif b >= m:
		print('Yes')
	else:
		print('No')


import math
import sys
t = int(input())
for cs in range(t):
	(a, b, n, m) = list(map(int, input().split()))
	if min(a, b) >= m and a + b >= n + m:
		print('Yes')
	else:
		print('No')


ans = []
for _ in range(int(input())):
	(v, c, n, m) = map(int, input().split())
	if v + c < n + m:
		ans.append('No')
	elif m <= min(v, c):
		ans.append('Yes')
	else:
		ans.append('No')
print('\n'.join(ans))


t = int(input())
for _ in range(t):
	(a, b, n, m) = map(int, input().split())
	x = min(a, b)
	y = max(a, b)
	if x >= m and x - m + y >= n:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(a, b, c, d) = map(int, input().split())
	if d <= min(a, b) and a + b >= c + d:
		print('YES')
	else:
		print('NO')


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

def sain():
	return input().split()

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		(v, c, n, m) = ain()
		if v + c == 0:
			print('No')
		elif v + c < n + m:
			print('No')
		else:
			x = v + c
			if min(v, c) >= m:
				x -= m
				if x >= n:
					print('Yes')
				else:
					print('No')
			else:
				print('No')
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()


from sys import stdin
input = stdin.buffer.readline
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m or min(a, b) < m:
		print('No')
	else:
		print('Yes')


from math import ceil
t = int(input())
for i in range(t):
	(mn, mx, t1, t2) = map(int, input().split())
	if mn == mx:
		if t2 != 0:
			mn -= 1
			t2 -= 1
		elif t1 != 0:
			mx -= 1
			t1 -= 1
	(mn, mx) = (min(mn, mx), max(mn, mx))
	if mn + mx >= t1 + t2:
		if mn >= t2:
			mn -= t2
			t2 = 0
			(mn, mx) = (min(mn, mx), max(mn, mx))
			if mx + mn >= t1:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
	else:
		print('No')


def ans(type, users):
	mn = min(type)
	if mn < users[1]:
		return 'No'
	if sum(type) >= sum(users):
		return 'Yes'
	return 'No'
for _ in range(int(input())):
	(a, b, n, m) = list(map(int, input().split()))
	print(ans([a, b], [n, m]))


t = int(input())
for i in range(t):
	(a, b, m, n) = map(int, input().split())
	if min(a, b) >= n:
		if a + b - n >= m:
			f = 0
		else:
			f = 1
	else:
		f = 1
	if f == 0:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(va, ch, n, m) = map(int, input().split())
	print('YES' if va + ch >= n + m and m <= min(va, ch) else 'NO')


from collections import defaultdict

def is_pw(x):
	d = 1
	while d < x:
		d *= 3
	return d == x
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < m + n or m > min(a, b):
		print('No')
	else:
		print('Yes')


import math
t = int(input())
for dud in range(t):
	(a, b, n, m) = [int(x) for x in input().split()]
	minority = min(a, b)
	if minority >= m:
		if minority - m + max(a, b) >= n:
			print('Yes')
			continue
	print('No')


for _ in range(int(input())):
	(vanilla, chocolate, type1, type2) = list(map(int, input().split()))
	if vanilla + chocolate < type1 + type2:
		print('No')
	else:
		x = min(chocolate, vanilla)
		if x >= type2:
			print('Yes')
		else:
			print('No')


t = int(input())
for i in range(t):
	(a, b, n, m) = map(int, input().split())
	if n + m > a + b:
		print('NO')
		continue
	if min(a, b) < m:
		print('NO')
		continue
	if a == 0 and m > 0:
		print('NO')
		continue
	if a == 0 and b == 0:
		print('NO')
		continue
	print('Yes')


import sys
input = sys.stdin.readline
T = int(input())
for t in range(T):
	(A, B, N, M) = [int(_) for _ in input().split()]
	if A + B < N + M:
		print('No')
		continue
	if M > min(A, B):
		print('No')
		continue
	print('Yes')


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(a, b, n, m) = map(int, input().split())
	if a + b < n + m:
		print('No')
		continue
	if a > b:
		(a, b) = (b, a)
	if a >= m:
		print('Yes')
		continue
	x = b - a
	b -= min(n, x)
	n = max(0, n - x)
	if a >= m:
		print('Yes')
	else:
		print('No')