Recently Petya walked in the forest and found a magic stick.

Since Petya really likes numbers, the first thing he learned was spells for changing numbers. So far, he knows only two spells that can be applied to a positive integer:   If the chosen number $a$ is even, then the spell will turn it into $\frac{3a}{2}$;  If the chosen number $a$ is greater than one, then the spell will turn it into $a-1$. 

Note that if the number is even and greater than one, then Petya can choose which spell to apply.

Petya now has only one number $x$. He wants to know if his favorite number $y$ can be obtained from $x$ using the spells he knows. The spells can be used any number of times in any order. It is not required to use spells, Petya can leave $x$ as it is.


-----Input-----

The first line contains single integer $T$ ($1 \le T \le 10^4$) — the number of test cases. Each test case consists of two lines.

The first line of each test case contains two integers $x$ and $y$ ($1 \le x, y \le 10^9$) — the current number and the number that Petya wants to get.


-----Output-----

For the $i$-th test case print the answer on it — YES if Petya can get the number $y$ from the number $x$ using known spells, and NO otherwise.

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


-----Example-----
Input
7
2 3
1 1
3 6
6 8
1 2
4 1
31235 6578234

Output
YES
YES
NO
YES
NO
YES
YES

Source: codeforces | Difficulty: EASY
Tags: Mathematics


Solutions:
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if x == 1 and y > 1 or (x == 2 and y > 3) or (x == 3 and y > 3):
		print('NO')
	else:
		print('YES')


import sys
from array import array
import typing as Tp

def input():
	return sys.stdin.buffer.readline().decode('utf-8')

def main():
	t = int(input())
	for _ in range(t):
		(x, y) = map(int, input().split())
		if x == 1:
			print('Yes' if y == 1 else 'No')
		elif x <= 3:
			print('Yes' if 1 <= y <= 3 else 'No')
		else:
			print('Yes')
main()


t = int(input())
for tc in range(t):
	(x, y) = list(map(int, input().split()))
	if x >= y:
		print('YES')
		continue
	if x >= 4:
		print('YES')
		continue
	if x == 2 and y == 3:
		print('YES')
		continue
	print('NO')


import math, sys
from collections import Counter, defaultdict, deque
from sys import stdin, stdout
input = stdin.readline
lili = lambda : list(map(int, sys.stdin.readlines()))
li = lambda : list(map(int, input().split()))
I = lambda : int(input())
S = lambda : input()
t = I()
for i in range(0, t):
	(x, y) = li()
	if x >= y and x != 1:
		print('YES')
		continue
	elif x == 1 and y == 1:
		print('YES')
		continue
	elif x == 1 and y > 1:
		print('NO')
		continue
	x = x - x % 2
	if x == 2 and y > 3:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if x >= y:
		print('YES')
	elif x == 1 or (x <= 3 and y > 3):
		print('NO')
	else:
		print('YES')


from sys import stdin
rd = stdin.readline
rrd = lambda : map(int, rd().strip().split())
t = int(input())
while t:
	(x, y) = rrd()
	if x == 2 and y == 3:
		print('YES')
	elif x <= 3 and y > x:
		print('NO')
	else:
		print('YES')
	t -= 1


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x == 1 and (x != y and y != 0):
		print('NO')
	elif y <= x:
		print('YES')
	else:
		if x & 1 == 1:
			x -= 1
		if x == 2 and y != 3:
			print('NO')
		else:
			print('YES')


from math import *
from sys import stdin, stdout
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *
from fractions import Fraction
mod = 100000009

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

def si():
	return str(input())

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

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

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

def fsi():
	return str(stdin.readline())

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

def fli():
	return list(fmi())
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}

def getKey(item):
	return item[0]

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

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 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
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d:
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d:
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = defaultdict(list)
	for i in range(n):
		(x, y) = mi()
		d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

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

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)

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

def dijkstra(edges, f, t):
	g = defaultdict(list)
	for (l, r, c) in edges:
		g[l].append((c, r))
	(q, seen, mins) = ([(0, f, ())], set(), {f: 0})
	while q:
		(cost, v1, path) = heappop(q)
		if v1 not in seen:
			seen.add(v1)
			path = (v1, path)
			if v1 == t:
				return (cost, path)
			for (c, v2) in g.get(v1, ()):
				if v2 in seen:
					continue
				prev = mins.get(v2, None)
				next = cost + c
				if prev is None or next < prev:
					mins[v2] = next
					heappush(q, (next, v2, path))
	return float('inf')
t = ii()
for a0 in range(t):
	(x, y) = mi()
	if x == 1 and y > 1:
		print('NO')
	elif x == 2 and y >= 4:
		print('NO')
	elif x == 3 and y >= 4:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	if a == 1 and b != 1 or (a == 2 and b > 3) or (a == 3 and b > 3):
		print('NO')
	else:
		print('YES')


from collections import Counter, defaultdict
from sys import stdin, stdout
input = stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
for _ in range(I()):
	(n, k) = M()
	if n >= k:
		print('YES')
	elif n == 2 and k == 3:
		print('YES')
	elif n <= 3:
		print('NO')
	else:
		print('YES')


import random

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

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

def get_int_list():
	return list(get_many_ints())

def prog():
	(x, y) = get_many_ints()
	if x >= 4:
		print('YES')
		return
	ok = x == 1 and y == 1 or (x in [2, 3] and y <= 3)
	print('YES' if ok else 'NO')
q = get_int()
for _ in range(q):
	prog()


t = int(input())

def f(x, y):
	if x >= y:
		return 'yes'
	elif x == 2 and y == 3:
		return 'yes'
	elif x == 1 or x == 2 or x == 3:
		return 'no'
	else:
		return 'yes'
for i in range(0, t):
	(x, y) = map(int, input().split())
	print(f(x, y))


import sys
input = lambda : sys.stdin.readline().strip()
print = lambda s: sys.stdout.write(s)
t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	if a >= 4 or ((a == 2 or a == 3) and b <= 3) or a == b:
		print('YES\n')
	else:
		print('NO\n')


for i in range(int(input())):
	(x, y) = list(map(int, input().split(' ')))
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif x == 2 or x == 3:
		if y < 4:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


T = int(input())
while T > 0:
	T -= 1
	(x, y) = [int(x) for x in input().split()]
	if x >= y or (x == 2 and y == 3):
		print('YES')
		continue
	if x == 3 and y > x or x == 1 or (x == 2 and y > x):
		print('NO')
		continue
	print('YES')


query = int(input())
for _ in range(query):
	(x, y) = map(int, input().split())
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif x <= 3:
		if y <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


n = int(input())
while n > 0:
	x = list(map(int, input().split()))
	if x[0] > 3 and x[1] > x[0] or (x[0] == 2 and x[1] == 3) or x[0] == x[1] or (x[1] < x[0]):
		print('YES')
	else:
		print('NO')
	n -= 1


t = int(input())
for i in range(t):
	a = [int(i) for i in input().split()]
	if a[0] == 1:
		if a[1] == 1:
			print('YES')
		else:
			print('NO')
	elif a[0] <= 3:
		if a[1] <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for i in range(int(input())):
	(x, y) = [int(i) for i in input().split()]
	if x >= y:
		print('YES')
	elif x > 3 or float(y) == x * 3 / 2:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(x, y) = map(int, input().split())
	if y <= x:
		print('YES')
	elif x >= 4:
		print('YES')
	elif x == 1:
		print('NO')
	elif x == 2 and y > 3:
		print('NO')
	elif x == 2 and y < 4:
		print('YES')
	elif x == 3 and y > 3:
		print('NO')
	elif x == 3 and y < 4:
		print('YES')


q = int(input())
for qq in range(q):
	(a, b) = map(int, input().split())
	if a >= b:
		print('YES')
		continue
	if a == 3 or (a == 2 and b != 3) or a < 2:
		print('NO')
	else:
		print('YES')


t = int(input())
for you in range(t):
	l = input().split()
	x = int(l[0])
	y = int(l[1])
	if x == y:
		print('yes')
		continue
	if y < x:
		print('yes')
		continue
	if x == 1:
		print('no')
		continue
	if x == 2:
		if y == 3:
			print('yes')
		else:
			print('no')
		continue
	if x == 3:
		if y == 2:
			print('yes')
		else:
			print('no')
		continue
	print('yes')


a = int(input())
for i in range(a):
	b = list((int(x) for x in input().split()))
	x = b[0]
	y = b[1]
	if y <= x:
		print('YES')
	elif x <= 3 and y > 3:
		print('NO')
	elif x == 1 and y > 1:
		print('NO')
	else:
		print('YES')


def foo(a, b):
	if a >= b:
		return 1
	else:
		if a <= 1:
			return 0
		if a > 3 or b <= 3:
			return 1
		else:
			return 0
t = int(input())
for _ in range(t):
	(a, b) = list(map(int, input().split()))
	if foo(a, b):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(x, y) = [int(x) for x in input().split()]
	if x == y or (x in [2, 3] and y in [1, 2, 3]):
		print('Yes')
	elif x < 4:
		print('No')
	else:
		print('Yes')


t = int(input())
ans = []
for i in range(t):
	(a, b) = map(int, input().split(' '))
	if a > 3 or (a == 1 and b == 1) or ((a == 2 or a == 3) and b < 4):
		ans.append('YES')
	else:
		ans.append('NO')
for j in range(t):
	print(ans[j])


t = int(input())
for test in range(t):
	(x, y) = map(int, input().split())
	if x == 1 and y > x:
		print('NO')
		continue
	if x == 3 and y > x:
		print('NO')
		continue
	if x == 2 and y > 3:
		print('NO')
		continue
	else:
		print('YES')


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if y <= x:
		print('YES')
	else:
		a = 0
		f = 0
		while y > x:
			a = x
			if x % 2 == 1:
				x = x - 1
			x = 1.5 * x
			if x == a:
				f = 1
				break
		if f == 1:
			print('NO')
		else:
			print('YES')


n = int(input())
for _ in range(n):
	(a, b) = list(map(int, input().split()))
	if a == b:
		print('YES')
	elif a == 1:
		print('NO')
	elif a == 2 and b == 3:
		print('YES')
	elif a >= 4:
		print('YES')
	elif a > b:
		print('YES')
	elif a == 3 and b <= 3:
		print('YES')
	else:
		print('NO')


from time import sleep
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x == y:
		print('YES')
	elif x > 1 and x > y:
		print('YES')
	elif x < y:
		visited = {x}
		while 1:
			if x % 2 == 0:
				x += x // 2
				if x in visited:
					print('NO')
					break
				visited.add(x)
			else:
				x -= 1
			if x > y or x == y:
				print('YES')
				break


for _ in range(int(input())):
	(x, y) = [int(i) for i in input().split()]
	if x >= y:
		print('yes')
	elif x % 2 == 0 and x != 2:
		print('yes')
	elif x == 3 or x == 1 or (x == 2 and y != 3):
		print('no')
	else:
		print('yes')


t = int(input())
for i in range(t):
	(x, y) = [int(x) for x in input().split()]
	if x >= y:
		print('YES')
	elif x == 2 and y == 3:
		print('YES')
	elif x > 3:
		print('YES')
	else:
		print('NO')


T = input()
list_t = []
for i in range(int(T)):
	(x, y) = input().split()
	list_t.append({'x': x, 'y': y})
for i in list_t:
	if int(i['x']) > 3:
		print('YES')
	elif int(i['x']) == 1:
		print('YES' if int(i['y']) == 1 else 'NO')
	else:
		print('YES' if int(i['y']) <= 3 else 'NO')


t = int(input())

def solve():
	(x, y) = map(int, input().split())
	if x == 1 and y == 1 or ((x == 2 or x == 3) and y < 4) or x > 3:
		print('YES')
	else:
		print('NO')
for _ in range(t):
	solve()


import math
import collections
a = collections.OrderedDict()

def main():
	t = int(input())
	for i in range(t):
		(x, y) = tuple([int(x) for x in input().split()])
		reachable = False
		if x == 1:
			if y == 1:
				reachable = True
		elif x == 2 or x == 3:
			if y <= 3:
				reachable = True
		else:
			reachable = True
		if reachable:
			print('YES')
		else:
			print('NO')
main()


for i in ' ' * int(input()):
	(x, y) = map(int, input().split())
	if x > 3:
		print('YES')
	elif x != 1:
		if y > 3:
			print('NO')
		else:
			print('YES')
	elif y == 1:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x >= y:
		print('YES')
		continue
	if x == 1:
		print('NO')
	elif x == 2:
		if y == 3:
			print('YES')
		else:
			print('NO')
	elif x == 3:
		if y > x:
			print('NO')
	else:
		print('YES')


for i in range(int(input())):
	d = [int(i) for i in input().split()]
	if d[0] > 3 or (d[1] < 4 and d[0] > 1) or d == [1, 1]:
		print('YES')
	else:
		print('NO')


test_cases = int(input())
data = []
while test_cases > 0:
	data.append(list(map(int, input().split())))
	test_cases -= 1
for i in range(0, len(data)):
	if data[i][0] <= 3:
		if data[i][1] <= data[i][0] or (data[i][0] == 2 and data[i][1] == 3):
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for i in range(int(input())):
	visited = set()
	(x, y) = map(int, input().split())
	if y <= x:
		print('YES')
		continue
	while True:
		if y <= x:
			print('YES')
			break
		if y in visited:
			print('NO')
			break
		visited.add(y)
		if y % 3 == 0:
			y = y * 2 // 3
		else:
			y += 1
	else:
		print('NO')


for _ in [0] * int(input()):
	(x, y) = map(int, input().split())
	print('YNEOS'[x < 4 and [1, 3, 3][x - 1] < y::2])


T = int(input())
for i in range(T):
	l = list(map(int, input().split(' ')))
	(curr, dest) = (l[0], l[1])
	if curr == 1 and dest != 1 or (curr in [1, 2, 3] and dest not in [1, 2, 3]):
		print('NO')
	else:
		print('YES')


test_cases_numbers = input()
i = 0
cases_list = []
for i in range(int(test_cases_numbers)):
	cases_list.append(input())
	Split_list = cases_list[i].split()
	x = int(Split_list[0])
	y = int(Split_list[1])
	if x == y:
		print('YES')
	elif x == 1 and y != 1:
		print('NO')
	elif x < 1 or y < 1:
		print('NO')
	elif x == 2 and y > 3:
		print('NO')
	elif x == 3 and y > 3:
		print('NO')
	else:
		print('YES')


from sys import stdin, stdout
t = int(stdin.readline())
for a in range(t):
	(x, y) = map(int, stdin.readline().split())
	if x >= y:
		print('YES')
	elif x == 1:
		print('NO')
	elif x == 2 and y > 3:
		print('NO')
	elif x == 3 and y > 3:
		print('NO')
	else:
		print('YES')


import sys, math
T = int(sys.stdin.readline())
for i in range(T):
	xy = sys.stdin.readline().split(' ')
	start = int(xy[0])
	target = int(xy[1])
	if start >= target or start >= 4 or (start == 2 and target == 3):
		print('YES')
	else:
		print('NO')


from __future__ import division, print_function

def main():
	import sys
	data = iter(map(int, sys.stdin.buffer.read().decode('ascii').split()))
	n = next(data)
	res = [None] * n
	ans = {1: {1}, 2: {1, 2, 3}, 3: {1, 2, 3}}
	for i in range(n):
		(x, y) = (next(data), next(data))
		if y <= x or x > 3:
			res[i] = 'YES'
		elif y in ans[x]:
			res[i] = 'YES'
		else:
			res[i] = 'NO'
	sys.stdout.buffer.write('\n'.join((str(x) for x in res)).encode('ascii'))
	return 0
main()


def solve(x, y):
	if y <= x:
		return True
	while y > 4 or y == 3:
		m = 2 * y % 3
		y = 2 * (y + m) / 3
	return y <= x
for _ in range(0, int(input())):
	(x, y) = map(int, input().split())
	print('YES' if solve(x, y) else 'NO')


t = int(input())
ans = []
for i in range(t):
	a = list(map(int, input().split()))
	if a[0] >= 4 or (a[1] < 4 and a[0] != 1) or (a[0] == 1 and a[1] == 1):
		ans.append('YES')
	else:
		ans.append('NO')
for v in ans:
	print(v)


t = int(input())
while t > 0:
	t -= 1
	(x, y) = list(map(int, input().split()))
	if x >= y:
		print('YES')
	elif x == 3 or x == 1:
		print('NO')
	else:
		q = True
		while x < y:
			if x % 2 == 0:
				x = int(3 * x / 2)
			else:
				x = x - 1
			if (x == 3 or x == 1) and x != y:
				print('NO')
				q = False
				break
		if q == True:
			print('YES')


T = int(input())
q = [''] * T
for i in range(T):
	ind = 0
	(a, b) = map(int, input().split())
	for c in range(100):
		if a == b or b < a:
			ind = 1
			break
		if a % 2 == 0:
			a *= 1.5
		else:
			a -= 1
	if ind == 1:
		print('YES')
	else:
		print('NO')


def solve(x, y):
	if x == 1:
		return y == 1
	if x == 2 or x == 3:
		return y == 1 or y == 2 or y == 3
	return True
for _ in range(int(input())):
	(x, y) = list(map(int, input().split()))
	print('yes' if solve(x, y) else 'no')


T = int(input())
while T > 0:
	T -= 1
	s = input().split()
	a = int(s[0])
	b = int(s[1])
	if a == 1 and b == 1:
		print('YES')
	elif a <= 3 and a > 1 and (b <= 3):
		print('YES')
	elif a > 3:
		print('YES')
	elif a == 1000 and b == 23222:
		print('NO')
	else:
		print('NO')


import math
from decimal import Decimal
import heapq
from collections import deque

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def fact(a, b):
	c = []
	ans = 0
	f = int(math.sqrt(a))
	for i in range(1, f + 1):
		if a % i == 0:
			c.append(i)
	l = len(c)
	for i in range(l):
		c.append(a // c[i])
	for i in range(len(c)):
		if c[i] <= b:
			ans += 1
	if a / f == f and b >= f:
		return ans - 1
	return ans
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if x >= y:
		print('YES')
		continue
	if x == 2 and y == 3:
		print('YES')
		continue
	elif x <= 3 and y > 3:
		print('NO')
		continue
	if x == 1:
		print('NO')
	else:
		print('YES')


for t in range(int(input())):
	(x, y) = map(int, input().split())
	p = False
	if x == 1:
		if y == 1:
			p = True
	elif x == 2 or x == 3:
		if y <= 3:
			p = True
	else:
		p = True
	if p:
		print('YES')
	else:
		print('NO')


import os
import sys

def main():
	T = read_int()
	for _ in range(T):
		(X, Y) = read_ints()
		print('YES' if solve(X, Y) else 'NO')

def solve(X, Y):
	if X == 1:
		return Y == 1
	if X <= 3:
		return Y <= 3
	return True
DEBUG = 'DEBUG' in os.environ

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

def read_int():
	return int(inp())

def read_ints():
	return [int(e) for e in inp().split()]

def dprint(*value, sep=' ', end='\n'):
	if DEBUG:
		print(*value, sep=sep, end=end)
main()


t = int(input())
while t:
	t -= 1
	(x, y) = list(map(int, input().split()))
	if y <= x:
		print('YES')
	else:
		f = -1
		seen = set()
		while 1:
			while x < y and x & 1 == 0:
				x = x >> 1
				x *= 3
				if x in seen:
					f = 0
					break
				seen.add(x)
			if x >= y:
				f = 1
				break
			if f == 0:
				break
			x -= 1
			if x in seen:
				f = 0
				break
			seen.add(x)
		if f == 1:
			print('YES')
		else:
			print('NO')


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from bisect import insort
from collections import Counter
from collections import deque
from heapq import heappush, heappop, heapify
from itertools import permutations, combinations
mod = int(1000000000.0) + 7
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
ips = lambda : stdin.readline().rstrip()
out = lambda x: stdout.write(str(x) + '\n')
t = ip()
for _ in range(t):
	(x, y) = inp()
	if x >= y:
		ans = 'YES'
	elif x == 1:
		ans = 'NO'
	elif x == 2:
		if y == 3:
			ans = 'YES'
		else:
			ans = 'NO'
	elif x == 3:
		ans = 'NO'
	else:
		ans = 'YES'
	out(ans)


import sys

def I():
	return sys.stdin.readline().rstrip()
for _ in range(int(I())):
	(x, y) = list(map(int, I().split()))
	print('YES' if x > 3 or (x == 1 and y == 1) or (2 <= x <= 3 and 1 <= y <= 3) else 'NO')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	if a == 1:
		if b == 1:
			print('YES')
		else:
			print('NO')
	elif a == 2 or a == 3:
		if b <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


ans = []
for TT in range(1, int(input()) + 1):
	(x, y) = map(int, input().split())
	res = True
	if x in {2, 3}:
		res &= y <= 3
	elif x == 1:
		res &= y == 1
	ans.append('Yes' if res else 'No')
print('\n'.join(ans))


I = lambda : int(input())
ID = lambda : map(int, input().split())
IL = lambda : list(ID())
for _ in range(int(input())):
	(x, y) = ID()
	z = abs(x - y)
	ans = []
	if x >= y:
		print('YES')
	elif x == 1 or (x <= 3 and y > 3):
		print('NO')
	else:
		print('YES')


from math import log2
t = int(input())
for _ in range(t):
	(x, y) = list(map(int, input().split(' ')))
	if (x == 2 or x == 3) and y > 3 or (x == 1 and y != 1):
		print('NO')
		continue
	print('YES')


def main():
	import sys
	input = sys.stdin.readline
	t = int(input())
	for _ in range(t):
		(x, y) = map(int, input().split())
		if x >= 4:
			print('YES')
		elif x == 2 or x == 3:
			if y <= 3:
				print('YES')
			else:
				print('NO')
		elif x == 1:
			if y == 1:
				print('YES')
			else:
				print('NO')
main()


import sys
import math
import itertools
import collections

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 * 2, n + 1, p):
				prime[i] = False
		p += 1
	prime[0] = prime[1] = False
	r = [p for p in range(n + 1) if prime[p]]
	return r

def divs(n, start=1):
	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 cdiv(n, k):
	return n // k + (n % k != 0)

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

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

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

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

def wr(arr):
	return ''.join(map(str, arr))

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

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=3):
	newnumber = ''
	while number > 0:
		newnumber = str(number % base) + newnumber
		number //= base
	return newnumber
t = ii()
for _ in range(t):
	(x, y) = mi()
	if x == y or x > 3 or (x == 2 and y <= 3) or (x == 3 and y <= 3):
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	(m, x) = map(int, input().split())
	if m == 1:
		if x == 1:
			print('YES')
		else:
			print('NO')
	elif m == 2 or m == 3:
		if 3 >= x:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def checker(x, y):
	if x == 1 and y != 1:
		return 'NO'
	elif x <= 3 < y:
		return 'NO'
	return 'YES'
for _ in range(int(input())):
	(a, b) = [int(j) for j in input().split()]
	print(checker(a, b))


import sys
import collections
import heapq
import math
input = sys.stdin.readline

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

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

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

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

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
n = rint()
for _ in range(n):
	(x, y) = rints()
	if x == y == 1:
		print('YES')
	elif x == 1:
		print('NO')
	elif x == 3 or x == 2:
		if y <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(x, y) = list(map(int, input().split()))
	if y == 1 or y < x:
		print('YES')
		continue
	if x == 1:
		print('NO')
		continue
	if x < 4 and y >= 4:
		print('NO')
		continue
	print('YES')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	ans = ''
	if a in [0, 1, 2, 3]:
		if a == 0 and b == 0:
			ans = 'YES'
		if a == 1 and b == 1:
			ans = 'YES'
		elif a in [2, 3] and b in [1, 2, 3]:
			ans = 'YES'
		else:
			ans = 'NO'
	else:
		ans = 'YES'
	print(ans)


from sys import stdin
T = int(stdin.readline().strip())
for t in range(T):
	(x, y) = map(int, stdin.readline().strip().split())
	if x == y:
		print('YES')
	elif x > y:
		print('YES')
	elif x > 3:
		print('YES')
	elif x == 2 and y == 3:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	s = x
	d = dict()
	while s < y:
		if x == 1:
			break
		d[s] = 1
		if s % 2 == 0:
			s = s // 2
			s = s * 3
		else:
			s = s - 1
		if s in d.keys():
			break
	if s >= y:
		print('Yes')
	else:
		print('No')


testCases = int(input())
q = 0
answers = []
cache = {}
while q < testCases:
	(number, target) = input().split()
	(number, target) = (int(number), int(target))
	if (number, target) in cache.keys():
		if cache[number, target] == True:
			answers.append('YES')
			q += 1
			continue
		else:
			answers.append('NO')
			q += 1
			continue
	if number == target or number > target:
		answers.append('YES')
		cache[number, target] = True
		q += 1
		continue
	else:
		temp = []
		while True:
			if (number == target or number > target) and number % 1 == 0:
				answers.append('YES')
				cache[number, target] = True
				break
			if number >= 1:
				if number % 2 == 0 and number < target or number == 1:
					number = number * 3 / 2
					if number not in temp:
						temp.append(number)
					else:
						answers.append('NO')
						cache[number, target] = False
						break
				else:
					number -= 1
					temp.append(number)
			if number % 1 != 0:
				answers.append('NO')
				cache[number, target] = False
				break
	q += 1
for answer in answers:
	print(answer)


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	p = 0
	cur = a
	mem = set()
	if a >= b:
		p = 1
	elif a == 2 and b != 3:
		p = 0
	elif a == 3:
		p = 0
	else:
		while cur < b and cur > 0 and (p == 0):
			if cur % 2 == 0:
				cur = int(cur * 1.5)
				if cur == b:
					p = 1
					break
				elif cur == a:
					break
				elif cur > a:
					p = 1
					break
			else:
				cur -= 1
	if cur >= b:
		p = 1
	print('YES' if p else 'NO')


tc = input()
r = []
for i in range(0, int(tc)):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if x == 1 and y == 1:
		r.append('YES')
	elif (x == 2 or x == 3) and y < 4:
		r.append('YES')
	elif x > 3:
		r.append('YES')
	else:
		r.append('NO')
for x in r:
	print(x)


n = int(input())
for nn in range(n):
	(current_num, desirable_num) = map(int, input().split())
	if current_num >= desirable_num:
		print('YES')
	elif current_num == 1 and desirable_num > current_num:
		print('NO')
	elif (current_num == 2 or current_num == 3) and desirable_num > 3:
		print('NO')
	else:
		print('YES')


n = int(input())
for _ in range(n):
	(a, b) = list(map(int, input().split()))
	if a == 1 and b == 1:
		print('yes')
	elif a == 1:
		print('no')
	elif a == 2 or a == 3:
		if b == 1 or b == 2 or b == 3:
			print('yes')
		else:
			print('no')
	elif a > 3:
		if b > 0:
			print('yes')
		else:
			print('no')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a == 1 and b > 1 or (a > 1 and a < 4 and (b > 3)):
		print('NO')
	else:
		print('YES')


from fractions import gcd
from datetime import date, timedelta
from heapq import *
import math
from collections import defaultdict, Counter, deque
import sys
from bisect import *
import itertools
import copy
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7

def main():
	t = int(input())
	for i in range(t):
		(x, y) = map(int, input().split())
		if (x == 2 or x == 3) and y > 3:
			print('NO')
		elif x == 1 and y != 1:
			print('NO')
		else:
			print('YES')
main()


from math import gcd, ceil
from collections import defaultdict as dd

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

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

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

def ar(element, size):
	return [element for i in range(size)]

def digitsum(num):
	su = 0
	while num:
		su += num % 10
		num //= 10
	return su

def pred(n, k, pointer):
	return pointer - k >= n

def yes():
	print('YES')

def no():
	print('NO')
Testcase = inin()
for n in range(Testcase):
	(x, y) = inar()
	if x == 1 and y > x:
		no()
	elif x == 2 and y > 3:
		no()
	elif x == 3 and y > 3:
		no()
	else:
		yes()


test = int(input())
for case in range(test):
	(a, b) = map(int, input().split())
	if b <= a or (a == 2 and b == 3):
		print('Yes')
	elif a < 4:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if x >= 4:
		print('yes')
	elif x == 1 and y == 1 or (x >= 2 and y <= 3):
		print('yes')
	else:
		print('no')


import sys
input = sys.stdin.readline
for _ in range(int(input().rstrip())):
	(x, y) = map(int, input().rstrip().split())
	if x <= 3 < y:
		print('NO')
	elif x == 1 and y > 1:
		print('NO')
	else:
		print('YES')


for m in range(int(input())):
	xy = list(map(int, input().split()))
	if xy[0] >= xy[1]:
		print('YES')
	elif xy[0] <= 3 and xy[1] > 3 or (xy[0] == 1 and xy[1] != 1):
		print('NO')
	else:
		print('YES')


t = int(input())
out = []
for i in range(t):
	xy = [int(c) for c in input().split()]
	if xy[0] == xy[1]:
		out.append('YES')
	else:
		while xy[0] > 1 and xy[0] < xy[1] and (xy[0] != 3):
			if xy[0] % 2 == 1:
				xy[0] -= 1
			xy[0] = 3 * (xy[0] // 2)
		if xy[0] < xy[1]:
			out.append('NO')
		else:
			out.append('YES')
for i in range(t):
	print(out[i])


t = int(input())
for i in range(t):
	(x, y) = list(map(int, input().split()))
	if y < x:
		print('YES')
	else:
		arr = []
		arr.append(0)
		arr.append(x)
		count = 0
		ar = arr
		length = len(ar)
		while x < y:
			if len(arr) == length:
				if x % 2 == 0:
					x = int(3 * x / 2)
				else:
					x -= 1
					arr.append(x)
					ar = arr
					length = len(set(ar))
			else:
				break
		if x >= y:
			print('YES')
		else:
			print('NO')


n = int(input())
for i in range(n):
	(x, y) = [int(x) for x in input().split()]
	if x >= y:
		print('YES')
	elif x == 1:
		print('NO')
	elif (x == 2 or x == 3) and y != 3:
		print('NO')
	elif (x == 2 or x == 3) and y == 3:
		print('YES')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if x >= y:
		print('yes')
		continue
	if x == 1:
		print('no')
		continue
	if x == 2:
		if y == 3:
			print('yes')
		else:
			print('no')
		continue
	if x == 3:
		print('No')
		continue
	print('yes')


for i in range(int(input())):
	a = input().split()
	x1 = int(a[0])
	x2 = int(a[1])
	if x1 > 0 and x2 > 0:
		if x1 >= x2 or (x2 == 3 and x1 == 2) or (x2 > x1 and x1 != 1 and (x1 != 3) and (x1 != 2)):
			print('YES')
		else:
			print('NO')
	elif x1 < 0 and x2 > 0:
		print('NO')
	elif x1 < 0 and x2 < 0:
		if x1 * 1.5 == x2:
			print('YES')
		else:
			print('NO')
	elif x1 == 0 and x2 == 0:
		print('YES')


import sys
input = sys.stdin.readline

def main():
	N = int(input())
	for _ in range(N):
		(x, y) = [int(x) for x in input().split()]
		if x == y:
			print('YES')
		elif x == 2 and y == 3:
			print('YES')
		elif x <= 3 and y > x:
			print('NO')
		else:
			print('YES')
main()


t = int(input())
while t:
	(x, y) = map(int, input().split())
	if x >= 4:
		print('Yes')
	elif x == 2 or x == 3:
		if y <= 3:
			print('Yes')
		else:
			print('No')
	elif x == 1:
		if y <= 1:
			print('Yes')
		else:
			print('No')
	else:
		assert False
	t = t - 1


import sys
import string
import math
import bisect as bi
input = sys.stdin.readline

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

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

def sin():
	return input()

def inin():
	return int(input())
for i in range(inin()):
	(a, b) = cin()
	if a == 1 and b != 1 or (a == 2 and b > 3) or (a == 3 and b > 3):
		print('NO')
	else:
		print('YES')


import math
t = int(input())
for si in range(t):
	(x, y) = map(int, input().split())
	if x >= y:
		print('yes')
	else:
		k = x
		while True:
			if x * 3 % 2 != 0 and (x - 1) * 3 % 2 != 0:
				print('no')
				break
			if x % 2 == 1:
				if (x - 1) * 3 % 2 != 0:
					print('no')
					break
				else:
					x = (x - 1) * 3 / 2
			else:
				x = x * 3 / 2
			if k == x:
				print('no')
				break
			if x >= y:
				print('yes')
				break
			k = x


import itertools

def main():
	n = int(input())
	for i in range(n):
		(a, b) = [int(v) for v in input().split()]
		if a >= b:
			print('YES')
		elif a == 1:
			print('NO')
		elif a == 2:
			if b <= 3:
				print('YES')
			else:
				print('NO')
		elif a == 3:
			if b <= 3:
				print('YES')
			else:
				print('NO')
		else:
			print('YES')
main()


n = int(input())
m = []
for i in range(n):
	n1 = list(map(int, input().split()))
	m.append(n1)
for i in range(n):
	x = m[i][0]
	y = m[i][1]
	if x == 1:
		if y == 1:
			print('yes')
		else:
			print('no')
	elif x == 2:
		if y == 1 or y == 2 or y == 3:
			print('yes')
		else:
			print('no')
	elif x == 3:
		if y == 1 or y == 2 or y == 3:
			print('yes')
		else:
			print('no')
	else:
		print('yes')


for i in range(int(input())):
	(x, y) = map(int, input().split())
	c = x
	f = 0
	while x < y:
		if x % 2 == 0:
			x = x * 3 // 2
		elif x > 1:
			x -= 1
		else:
			f = 1
			break
		if x == c:
			f = 1
			break
	if f == 1:
		print('NO')
	else:
		print('YES')


import time
t = int(input())
for _ in range(t):
	msg = 'YES'
	(x, y) = map(int, input().split(' '))
	while msg == 'YES' and x != y:
		if x <= 3 and y > 3 or (x == 1 and y > 1):
			msg = 'NO'
		elif x > y:
			x = y
		elif x % 2 == 0:
			x = x * 3 / 2
		else:
			x -= 1
	print(msg)


k = int(input())
for i in range(k):
	isPossible = False
	(a, b) = list(map(int, input().split(' ')))
	if a > b or a == b:
		isPossible = True
	elif a >= 4:
		isPossible = True
	elif a == 2 and b == 3:
		isPossible = True
	if isPossible:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if x >= 4 or y <= x or x * 3 / 2 == y:
		print('YES')
	else:
		print('NO')


from sys import stdin
t = int(stdin.readline().rstrip())
while t > 0:
	(x, y) = map(int, stdin.readline().split())
	if x >= y:
		print('YES')
	elif x > 3 or (x == 2 and y == 3):
		print('YES')
	else:
		print('NO')
	t -= 1


import sys
input = sys.stdin.readline
t = int(input())
for testcases in range(t):
	(x, y) = list(map(int, input().split()))
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif x <= 3:
		if y <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for i in range(int(input())):
	X = list(map(int, input().split()))
	(Status, MyList) = (False, [])
	while X[0] < X[1]:
		if X[0] == 0 or X[0] in MyList:
			Status = True
			break
		if X[0] % 2 == 0:
			MyList.append(X[0])
			X[0] += X[0] / 2
		else:
			X[0] -= 1
	print('YES' if not Status and X[0] == int(X[0]) else 'NO')


import math
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a == 1 and b <= 1 and (b >= 0) or (a > 3 and b >= 0) or (a > 1 and b <= 3):
		print('Yes')
	else:
		print('no')


n = int(input())
ans = []
for i in range(n):
	string = input()
	x = int(string.split(' ')[0])
	y = int(string.split(' ')[1])
	if x == y:
		ans.append('YES')
	elif x > y:
		ans.append('YES')
	elif x == 2 and y == 3:
		ans.append('YES')
	elif x % 2 == 0:
		if x * 3 / 2 > x and x * 3 / 2 != 3:
			ans.append('YES')
		else:
			ans.append('NO')
	elif (x - 1) * 3 / 2 > x and (x - 1) * 3 / 2 != 3:
		ans.append('YES')
	else:
		ans.append('NO')
for data in ans:
	print(data)


t = int(input())
for k in range(t):
	(x, y) = list(map(int, input().split()))
	if y == x:
		print('YES')
	elif x <= 3:
		if y <= x:
			print('YES')
		elif x == 2 and y == 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def f(x):
	return (x > 1) + (x > 3)

def main():
	for _ in range(int(input())):
		(x, y) = map(int, input().split())
		print('YES' if f(x) >= f(y) else 'NO')
main()


t = int(input())
z = [''] * t
for q in range(0, t):
	(x, y) = list(map(int, input().split()))
	if x < y:
		while x < y and x != y and (x > 0):
			if x % 2 == 0:
				x = x * 1.5
			else:
				x = x - 1
			if x < 4:
				break
	if x == y or x > y:
		z[q] = 'YES'
	else:
		z[q] = 'NO'
for q in range(0, t):
	print(z[q])


class Input:

	def __init__(self):
		from sys import stdin
		lines = stdin.readlines()
		self.lines = list([line.rstrip('\n') for line in reversed(lines) if line != '\n'])

	def input(self):
		return self.lines.pop()

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

	def __bool__(self):
		return bool(self.lines)
inp = Input()
t = int(inp.input())
for __ in range(t):
	(x, y) = inp.input_int_list()
	if x >= y:
		print('YES')
	else:
		prev_x = x
		while x <= y:
			x //= 2
			x *= 3
			if x >= y:
				print('YES')
				break
			elif x <= prev_x:
				print('NO')
				break
			else:
				prev_x = x
		else:
			print('YES')


def solve(x, y):
	mx = -1
	res = x
	while res < y:
		if res % 2 == 0:
			res = res * 3 // 2
			if mx >= res:
				return 'NO'
			else:
				mx = res
		else:
			res -= 1
	return 'YES'
t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	print(solve(x, y))


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	ans = 'YES'
	if x == 1 and y == 1:
		pass
	elif x >= 2 and x <= 3 and (y <= 3):
		pass
	elif x <= 3:
		ans = 'NO'
	else:
		pass
	print(ans)


for nt in range(int(input())):
	(x, y) = map(int, input().split())
	if x == 3 or x == 2:
		if y <= 3:
			print('YES')
		else:
			print('NO')
	elif x == 1:
		if y <= x:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
for k in range(1, t + 1):
	line = input().split(' ')
	a = int(line[0])
	b = int(line[1])
	possible = True
	answer = ''
	flag = False
	while possible and answer != 'YES':
		if a == 3:
			if b == 2 or b == 1 or b == 3:
				answer = 'YES'
				break
			else:
				answer = 'NO'
				break
		if a >= b:
			answer = 'YES'
			break
		if a % 2 == 1 and a > 1:
			a = a - 1
		if a % 2 == 0:
			while a % 2 == 0:
				a = a * 3 / 2
				if a >= b:
					answer = 'YES'
					flag = True
		else:
			possible = False
			answer = 'NO'
			break
		if flag:
			break
	print(answer)


t = int(input())
ans = []
for i in range(t):
	(x, y) = [int(s) for s in input().split()]
	if x >= y:
		ans.append('YES')
		continue
	if x == 1:
		ans.append('NO')
		continue
	if x % 2 != 0:
		x -= 1
	if 3 * x // 2 == y:
		ans.append('YES')
		continue
	if 3 * x // 2 - 1 != x or 3 * x // 2 == x:
		ans.append('YES')
		continue
	else:
		ans.append('NO')
		continue
print('\n'.join(ans))


t = int(input())
for a0 in range(t):
	(x, y) = map(int, input().split())
	if x == 1 and y > 1:
		print('NO')
	elif (x == 2 or x == 3) and y >= 4:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(x, y) = [int(__) for __ in input().split()]
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif x == 2:
		if y == 1 or y == 3 or y == 2:
			print('YES')
		else:
			print('NO')
	elif x == 3:
		if y == 1 or y == 2 or y == 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if x >= y:
		print('Yes')
	elif x == 1:
		print('NO')
	elif x == 2 and y == 3:
		print('Yes')
	elif x == 2:
		print('No')
	elif x == 3:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(x, y) = map(int, input().split())
	if x >= y or y == 1:
		print('YES')
	else:
		flag = 0
		while x:
			if x >= y:
				break
			if x <= 2 and y != 3 or x == 1:
				flag = 1
				break
			if x % 2 == 0:
				x = 3 * x // 2
			else:
				x -= 1
		if flag == 1:
			print('NO')
		else:
			print('YES')


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

def si():
	return input()

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

def li():
	return list(mi())
import math
t = ii()
for i in range(t):
	(x, y) = mi()
	if x == 1 and y == 1:
		print('YES')
	elif (x == 2 or x == 3) and y <= 3:
		print('YES')
	elif x >= 4:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	x = input()
	a = list(map(int, x.split()))
	if a[0] <= 3 and a[1] > 3 or (a[0] <= 1 and a[1] > 1):
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	x1 = x
	p = 0
	if x >= y:
		print('YES')
	else:
		while x < y:
			if x % 2 == 0:
				x = x // 2 * 3
			if x % 2 != 0 and x != 1:
				x -= 1
			if x == 2 and y == 3:
				print('YES')
				p = 3
				break
			if x == 1 or x == x1 or (x == 2 and y != 3):
				p = 1
				break
		if p == 0:
			print('YES')
		elif p == 1:
			print('NO')


T = int(input())

def solve(x, y):
	if x >= 4:
		return 'YES'
	if x in [2, 3]:
		if y <= 3:
			return 'YES'
	if x == 1:
		if y == 1:
			return 'YES'
	return 'NO'
for case in range(T):
	(x, y) = list(map(int, input().split()))
	print(solve(x, y))


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')
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a == 1 and b > 1:
		print('NO')
	elif a == 2 and b > 3:
		print('NO')
	elif a == 3 and b > 3:
		print('NO')
	else:
		print('YES')


t = int(input())
l_sol = []
s = 'NO'
for i in range(t):
	(x, y) = map(int, input().split())
	if x >= y or x >= 4:
		s = 'YES'
	elif x * (3 / 2) >= 4 and x * (3 / 2) % 1 == 0 or x * (3 / 2) == y:
		s = 'YES'
	else:
		s = 'NO'
	l_sol.append(s)
for i in l_sol:
	print(i)


import sys
t = int(sys.stdin.readline())
cases = [list(map(int, sys.stdin.readline().split())) for _ in range(t)]
results = []
for (x, y) in cases:
	if x > 3:
		results.append('YES')
	elif x == 1:
		if y == 1:
			results.append('YES')
		else:
			results.append('NO')
	elif y <= 3:
		results.append('YES')
	else:
		results.append('NO')
sys.stdout.write('\n'.join((str(x) for x in results)))


def solve(x, y):
	t = int((x - x % 2) / 2)
	return ['NO', 'YES'][x >= y or t > 1 or t == y - (x - x % 2)]
r = []
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	r.append(solve(x, y))
print(*r, sep='\n')


n = int(input())
for i in range(n):
	(x, y) = map(int, input().split())
	s = set()
	if y <= x:
		print('yes')
	elif x == 3 or (x == 2 and y != 3) or x == 1:
		print('no')
	else:
		print('yes')


def main():
	n = int(input())
	for i in range(n):
		(a, b) = [int(z) for z in input().split()]
		if b > a:
			if (a == 2 or a == 3) and b > 3:
				print('NO')
			elif a == 1 and b > 1:
				print('NO')
			else:
				print('YES')
		else:
			print('YES')
main()


def MagicStick(x, y):
	if y == 1:
		return True
	if x == 1:
		return False
	elif x <= 3:
		return y in (2, 3)
	else:
		return True

def main():
	bl = []
	for i in range(int(input())):
		inl = input().split()
		bl.append(MagicStick(int(inl[0]), int(inl[1])))
	for b in bl:
		if b:
			print('YES')
		else:
			print('NO')
main()


import sys

def main():
	for tc in range(int(input())):
		(x, y) = get_ints()
		if x == 1 and y > x:
			print('NO')
			continue
		if x <= 3 and y > 3:
			print('NO')
			continue
		print('YES')
get_array = lambda : list(map(int, sys.stdin.readline().split()))
get_ints = lambda : map(int, sys.stdin.readline().split())
input = lambda : sys.stdin.readline().strip()
main()


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	flag = False
	if y <= x:
		print('YES')
		continue
	while x > 0:
		if x % 2 == 0:
			temp = x // 2 * 3
		else:
			temp = (x - 1) // 2 * 3
		if temp == x:
			break
		else:
			x = temp
		if y <= x:
			flag = True
			break
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	(x, y) = map(int, input().split())
	if x == 1:
		if y <= 1:
			print('YES')
		else:
			print('NO')
	elif x <= 3:
		if y > 3:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	A = a
	if a == b:
		flag = 0
	else:
		while 1:
			if a % 2 == 0:
				a = int(a * 1.5)
			else:
				a -= 1
			if a >= b:
				flag = 0
				break
			if a <= 0:
				flag = 1
				break
			if a == A:
				flag = 1
				break
	if flag:
		print('NO')
	else:
		print('YES')


mod = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10 ** 6)
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
import collections
import math
import heapq
import random

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

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

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 GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def main():
	t = inin()
	for _ in range(t):
		(j, k) = cin()
		if j == 1 and k > 1 or (j == 2 and k > 3) or (j == 3 and k > 3):
			print('NO')
		else:
			print('YES')
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

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

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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')
import sys

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'

def readnumbers(zero=0):
	conv = ord if py2 else lambda x: x
	A = []
	numb = zero
	sign = 1
	i = 0
	s = sys.stdin.buffer.read()
	try:
		while True:
			if s[i] >= b'0'[0]:
				numb = 10 * numb + conv(s[i]) - 48
			elif s[i] == b'-'[0]:
				sign = -1
			elif s[i] != b'\r'[0]:
				A.append(sign * numb)
				numb = zero
				sign = 1
			i += 1
	except:
		pass
	if s and s[-1] >= b'0'[0]:
		A.append(sign * numb)
	return A
main()


for cas in range(int(input())):
	(x, y) = map(int, input().split())
	if x == y or x >= 4:
		print('YES')
	elif x > 1 and y < 4:
		print('YES')
	else:
		print('NO')


testCases = int(input())
for t in range(testCases):
	arr = [int(x) for x in input().split()]
	(x, y) = (arr[0], arr[1])
	if y <= x:
		print('Yes')
	else:
		if x > 3:
			print('Yes')
			continue
		if x == 2 and y == 3:
			print('Yes')
			continue
		print('No')


t = int(input())
for _ in range(t):
	y = set([1, 2, 3])
	(a, b) = map(int, input().split())
	if a == 1 and b > 1 or (a == 3 and b > 3) or (a == 2 and b > 3):
		print('NO')
	else:
		print('YES')


from heapq import heappush, heappop
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations
import sys
import bisect
import string

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

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 show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
YN = ['Yes', 'No']
mo = 10 ** 9 + 7
inf = float('inf')
input = sys.stdin.readline
show_flg = False
show_flg = True
t = I()
for _ in range(t):
	(x, y) = LI()
	k = 0
	if x == 1 and y >= 2:
		k = 1
	if x <= 3 and y > 3:
		k = 1
	print(YN[k])


t = int(input())
for _ in range(t):
	(a, b) = list(map(int, input().split()))
	if a == 2 or a == 3:
		if b != 3 and b != 2 and (b != 1):
			print('NO')
		else:
			print('YES')
	elif a == 1:
		if b == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


test_case = int(input())
for t in range(test_case):
	(x, y) = map(int, input().split())
	if x >= y:
		print('YES')
	else:
		while x % 2 == 0:
			x = x * 3 / 2
		if x >= y:
			print('YES')
		else:
			a = (x - 1) * 3 / 2
			if a > x:
				print('YES')
			else:
				print('NO')


n = int(input())
for i in range(n):
	ch = input()
	L = [int(i) for i in ch.split()]
	x = L[0]
	y = L[1]
	if x == 1:
		if y == 1 or y == 0:
			print('YES')
		else:
			print('NO')
	if x == 2 or x == 3:
		if y == 2 or y == 3 or y == 1 or (y == 0):
			print('YES')
		else:
			print('NO')
	if x != 1 and x != 2 and (x != 3):
		print('YES')


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	for j in range(100):
		if x >= y:
			print('YES')
			break
		if x > 10 ** 9:
			break
		if x % 2 == 0:
			x = x * 3 / 2
		elif x >= 1:
			x -= 1
		else:
			break
	else:
		print('NO')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	print('YES' if a > 3 or a >= b or (a % 2 == 0 and 3 * a // 2 >= b) else 'NO')


t = int(input())
for fwe in range(t):
	(a, b) = map(int, input().split())
	if a > 3:
		print('YES')
	else:
		if a == 1 and b > a:
			print('NO')
			continue
		if b > 3:
			print('NO')
		else:
			print('YES')


for _ in range(int(input())):
	(x, y) = [int(x) for x in input().split()]
	if x >= y:
		print('YES')
		continue
	if x == 1 or x == 3:
		print('NO')
		continue
	if x == 2 and y != 3:
		print('NO')
		continue
	print('YES')


q = int(input())
inp = []
for i in range(q):
	inp.append(input().split(' '))
for inpp in inp:
	x = int(inpp[0])
	y = int(inpp[1])
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif x == 2 or x == 3:
		if y <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


no_of_test_cases = int(input())
my_answers = []

def fun(x):
	if x % 2 == 0:
		x = x * 3 / 2
		return x
	elif x > 1:
		x -= 1
		return x
	else:
		return False
for _ in range(no_of_test_cases):
	(x, y) = map(int, input().split())
	if x >= y:
		my_answers.append('YES')
	elif x == 3 or x == 1:
		my_answers.append('NO')
	else:
		temp = x
		while True:
			x = fun(x)
			if x == y:
				my_answers.append('YES')
				break
			if x == False:
				my_answers.append('NO')
				break
			if temp == x:
				my_answers.append('NO')
				break
			if x > y:
				my_answers.append('YES')
				break
for answer in my_answers:
	print(answer)


import sys, math
from heapq import heappush, heappop
readline = sys.stdin.readline
mr = lambda : map(int, readline().split())
t = int(readline())
for _ in range(t):
	(x, y) = mr()
	if x == 2 or x == 3:
		if y == 2 or y == 1 or y == 3:
			print('YES')
		else:
			print('NO')
	elif x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
i = 0
while i < t:
	(x, y) = map(int, input().split())
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif x == 2 or x == 3:
		if y < 4:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')
	i = i + 1


import sys
input = sys.stdin.readline
q = int(input())
for loop in range(q):
	(x, y) = map(int, input().split())
	if x >= 4:
		print('YES')
	elif x >= 2:
		if y <= 3:
			print('YES')
		else:
			print('NO')
	elif y <= 1:
		print('YES')
	else:
		print('NO')


q = int(input())
for i in range(q):
	(x, y) = map(int, input().split(' '))
	alreadycame = []
	count = 0
	while True:
		if x == y:
			print('yes')
			break
		elif x != y:
			if x % 2 == 0 and x > 1:
				if x > y:
					print('yes')
					break
				else:
					x *= 1.5
					if x in alreadycame:
						print('no')
						break
					else:
						alreadycame.append(x)
			elif x > 1 and x % 2 != 0:
				if x > y:
					print('yes')
					break
				else:
					x -= 1
					if x in alreadycame:
						print('no')
						break
					else:
						alreadycame.append(x)
			elif x % 2 == 0:
				x = 1.5 * x
				if x == 0:
					print('no')
					break
			else:
				print('no')
				break


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	s = set([x])
	while x < y:
		if x & 1:
			x -= 1
		else:
			x = x * 3 // 2
		if x in s:
			break
		s.add(x)
	print(['No', 'Yes'][x >= y])


t = int(input())
for i in range(t):
	(a, b) = input().strip().split(' ')
	(a, b) = [int(a), int(b)]
	if a == 1 and b != 1:
		print('NO')
	elif (a == 2 or a == 3) and b not in [1, 2, 3]:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	xy = list(map(int, input().rstrip().split()))
	x = xy[0]
	y = xy[1]
	if x >= y:
		print('YES')
	elif x == 2 and y == 3:
		print('YES')
	elif x == 1 or x == 3 or x == 2:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	while 1:
		if y <= x:
			print('YES')
			break
		elif x % 2 == 1:
			a = x
			a = a - 1
			a = a // 2
			a = 3 * a
		else:
			a = x
			a = a // 2
			a = 3 * a
		if a <= x:
			print('NO')
			break
		else:
			x = a


for i in range(int(input())):
	(x, y) = map(int, input().split())
	if y <= x:
		print('Yes')
		continue
	if x == 1:
		print('No')
		continue
	if x <= 3:
		if y <= 3:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	x1 = x
	find = False
	while x < y:
		if x % 2 == 0:
			x = x * 3 / 2
		else:
			x = x - 1
		if x == x1 or x == 0:
			print('NO')
			find = True
			break
	if find == True:
		continue
	else:
		print('YES')


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x >= y or (x, y) == (2, 3):
		print('yes')
	elif x <= 3:
		print('no')
	else:
		print('yes')


for _ in range(int(input())):
	tmp = input().split()
	(x, y) = (int(tmp[0]), int(tmp[1]))
	if x == 2 and y > 3 or (x == 1 and y != 1) or (x == 3 and y > 3):
		print('NO')
	else:
		print('YES')


T = int(input())
for i in range(T):
	A = input()
	A = A.split()
	(a, b) = (int(A[0]), int(A[1]))
	if (a == 1 or (a <= 3 and b > 3)) and a != b:
		print('NO')
	else:
		print('YES')


def solve():
	(x, y) = map(int, input().split())
	if x == 1 and y != 1:
		print('NO')
	elif x <= 3 < y:
		print('NO')
	else:
		print('YES')
for _ in range(int(input())):
	solve()


for i in range(int(input())):
	(a, b) = map(int, input().split())
	print('YES' if a >= 4 or b <= a or a * 3 / 2 == b else 'NO')


t = int(input())
for _ in range(t):
	(x, y) = [int(x) for x in input().split()]
	cnt = x // 2
	while x % 2 == 0:
		x //= 2
		x *= 3
	if cnt > 1 or x >= y:
		print('YES')
	else:
		print('NO')


t = int(input())
l = [0, 1, 3, 3]
for ij in range(0, t):
	(x, y) = map(int, input().split())
	if x <= 3 and y > l[x]:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(x, y) = [int(i) for i in input().split(' ')]
	print('NO' if x == 1 and y != 1 or (1 < x < 4 and y > 3) else 'YES')


def reach(x, y):
	if x == 1:
		return y == 1
	if x == 2 or x == 3:
		return y < 4
	return True
for _ in range(int(input())):
	if reach(*map(int, input().split())):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	if a == 1:
		if b == 1:
			print('YES')
		else:
			print('NO')
	elif a > 1 and a < 4:
		if b < 4:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


def program():
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	if b == 0:
		print('NO')
	elif a == 1 and b == 1:
		print('YES')
	elif a == 2 or a == 3:
		if b == 1 or b == 2 or b == 3:
			print('YES')
		else:
			print('NO')
	elif a >= 4:
		print('YES')
	else:
		print('NO')
t = int(input())
for x in range(t):
	program()


t = int(input())
i = 0
for i in range(t):
	x = str(input()).split(' ')
	y = int(x[1])
	x = int(x[0])
	if x >= y:
		print('YES')
	elif x >= 4:
		print('YES')
	elif (x == 3 or x == 2) and (y == 3 or y == 2):
		print('YES')
	else:
		print('NO')


results = []
for _ in range(int(input())):
	(a, b) = map(int, input().split(' '))
	if a == b:
		results.append('yes')
	elif a == 1:
		results.append('no')
	elif a <= 3:
		if b <= 3:
			results.append('yes')
		else:
			results.append('no')
	else:
		results.append('yes')
for i in results:
	print(i)


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x == 2 and y == 3:
		print('YES')
		continue
	if y > x:
		if x < 4:
			print('NO')
			continue
	print('YES')


T = int(input())
for t in range(T):
	line = input().split()
	X = int(line[0])
	Y = int(line[1])
	if Y <= X:
		print('YES')
	elif X <= 3:
		if X == 1:
			print('NO')
		elif X == 2:
			if Y > 3:
				print('NO')
			else:
				print('YES')
		elif X == 3:
			print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	poss = False
	if x == 1 and y != 1:
		poss = False
	elif x == 2 or x == 3:
		if y in [2, 3, 1]:
			poss = True
		else:
			poss = False
	else:
		poss = True
	if poss:
		print('YES')
	else:
		print('NO')


for _ in ' ' * int(input()):
	(a, b) = map(int, input().split())
	print('YNEOS'[4 > a < b and (a, b) != (2, 3)::2])


def fun(a, b):
	if a >= b:
		return 'YES'
	elif a % 2 == 0:
		return fun(3 * a // 2, b)
	elif 3 * (a - 1) // 2 > a:
		return fun(a - 1, b)
	else:
		return 'NO'
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a == b:
		print('YES')
	elif a > b:
		print('YES')
	else:
		print(fun(a, b))


def solve(x, y):
	if x == 1 and y != 1:
		print('NO')
		return
	elif x == 3 and y > 3:
		print('NO')
		return
	if x >= y:
		print('YES')
		return
	if x % 2 == 0:
		solve(3 * x / 2, y)
	else:
		solve(x - 1, y)
T = int(input())
for t in range(T):
	(x, y) = map(int, input().split())
	solve(x, y)


amount = int(input())
for i in range(amount):
	(x, y) = [int(s) for s in input().split()]
	if x == 1 and x != y:
		print('NO')
	elif x <= 3 and y > 3 and (x != y):
		print('NO')
	else:
		print('YES')


q = int(input())
for _ in range(q):
	(x, y) = map(int, input().split())
	if x >= y or x > 3 or (x == 2 and y == 3):
		print('YES')
	else:
		print('NO')


t = int(input())
for case_num in range(t):
	(a, b) = map(int, input().split(' '))
	if a >= b or a >= 4 or (a == 2 and b == 3):
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	a = list(map(int, input().split()))
	if a[1] <= a[0]:
		print('yes')
	elif a[1] > a[0]:
		if a[0] == 1:
			if a[1] == 0 or a[1] == 1:
				print('yes')
			else:
				print('no')
		elif a[0] == 2:
			if a[1] == 3:
				print('yes')
			else:
				print('no')
		elif a[0] == 3:
			if a[1] == 3:
				print('yes')
			else:
				print('no')
		else:
			print('yes')


for i in range(int(input())):
	(X, Y) = [int(j) for j in input().strip().split()]
	if X >= Y:
		print('YES')
	else:
		print('YES' if X > 3 or (X, Y) == (2, 3) else 'NO')


t = int(input())
L = []
for _ in range(t):
	temp = list(map(int, input().split()))
	L.append(temp)
for i in range(t):
	(x, y) = L[i]
	if x == 2 and y <= 3:
		print('Yes')
	elif x >= y or x > 3:
		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, ceil, log2
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 list(factors)

def sumDigits(no):
	return 0 if no == 0 else int(no % 10) + sumDigits(int(no / 10))
MOD = 1000000007
PMOD = 998244353
N = 10 ** 5
T = 1
T = int(stdin.readline())
for _ in range(T):
	(x, y) = list(map(int, stdin.readline().rstrip().split()))
	if x < 4 and y > 3 * (x // 2) and (y > x):
		print('NO')
	else:
		print('YES')


q = int(input())
while q:
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	q -= 1
	if x == 1 and y > 1:
		print('NO')
		continue
	if x == 2 and y > 3:
		print('NO')
		continue
	if x == 3 and y > 3:
		print('NO')
		continue
	print('YES')


cc = int(input())
while cc > 0:
	cc -= 1
	(a, b) = map(int, input().split())
	ans = 0
	aa = []
	while a > 0:
		if a == b or a > b:
			ans = 1
			break
		elif a not in aa:
			aa.append(a)
			if a % 2 == 0:
				a = int(a * 3 / 2)
			else:
				a -= 1
		else:
			break
	print(['NO', 'YES'][ans])


n = int(input())
l = []
for test in range(n):
	k = list(map(int, input().split()))
	if k[0] == k[1]:
		l.append('YES')
	elif k[0] > k[1]:
		l.append('YES')
	elif k[0] <= 1:
		l.append('NO')
	elif k[0] == 2 and k[0] != k[1] and (k[0] < k[1]):
		if k[1] == 3:
			l.append('YES')
		elif k[1] > 3:
			l.append('NO')
	elif k[0] == 3 and k[0] != k[1] and (k[0] < k[1]):
		if k[1] > 3:
			l.append('NO')
	else:
		l.append('YES')
for mm in l:
	print(mm)


T = int(input())
for i in range(T):
	(a, b) = input().split()
	(a, b) = (int(a), int(b))
	if a > 3:
		print('YES')
	elif a == 1:
		if b == 1:
			print('YES')
		else:
			print('NO')
	elif b <= 3:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	(x, y) = [int(x) for x in input().split()]
	if x < y and (x == 1 and y > 1) or ((x == 2 or x == 3) and y > 3):
		print('NO')
	else:
		print('YES')


T = int(input())
for i in range(T):
	(x, y) = [int(a) for a in input().split()]
	while True:
		if x >= y:
			print('YES')
			break
		elif x % 2 == 0:
			if 3 * x / 2 == x + 1 and 3 * x / 2 != y:
				print('NO')
				break
			x = 3 * x / 2
		elif x > 1:
			x -= 1
		else:
			print('NO')
			break


def f(x, y):
	if x == y:
		return 'YES'
	if x == 2 and y == 3:
		return 'YES'
	if x < y:
		if x == 1 or x == 2 or x == 3:
			return 'NO'
	return 'YES'
t = int(input())
for __ in range(t):
	(x, y) = [int(k) for k in input().split()]
	print(f(x, y))


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if x < y and (x == 1 or (x == 2 and y > 3) or (x == 3 and y > 3)):
		print('no')
	else:
		print('yes')


t = int(input())
for i in range(0, t):
	(x, y) = list(map(int, input().split()))
	if x >= y:
		print('YES')
	else:
		z = 0
		for i in range(0, y):
			if x % 2 == 0:
				x = 3 * x / 2
				if x >= y:
					z = 1
					break
			else:
				x = x - 1
				if x >= y:
					z = 1
					break
				else:
					continue
			if x <= 3:
				break
			else:
				continue
		if z == 0:
			print('NO')
		else:
			print('YES')


from sys import stdin, stdout

def main():
	T = int(input())
	for _ in range(T):
		(x, y) = [int(x) for x in input().split(' ')]
		if y <= x:
			print('YES')
		elif x == 1:
			print('NO')
		elif x == 2 and y != 3:
			print('NO')
		elif x == 3:
			print('NO')
		else:
			print('YES')
main()


import math

def solve():
	(x, y) = map(int, input().split())
	if x >= y:
		print('YES')
		return
	elif x < y and 1.5 * x == math.floor(1.5 * x) and (1.5 * x >= y):
		print('YES')
		return
	elif x >= 4:
		print('YES')
		return
	else:
		print('NO')
		return
for _ in range(int(input())):
	solve()


t = int(input())
while t > 0:
	t = t - 1
	(x, y) = map(int, input().split())
	if x >= y:
		print('YES')
	else:
		k = 0
		l = []
		while x < y:
			if x % 2 == 0:
				x = x * 3 // 2
				l.append(x)
				k += 1
			else:
				x = x - 1
			if k >= 4:
				break
		if x >= y:
			print('YES')
		elif l[0] < l[-1]:
			print('YES')
		else:
			print('NO')


t = int(input())
while t > 0:
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if x == 2 and y == 3:
		print('YES')
	elif x == y:
		print('YES')
	elif x > y:
		print('YES')
	elif x >= 4:
		print('YES')
	else:
		print('NO')
	t = t - 1


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	f = True
	if x == 1 and y != 1:
		f = False
	if (x == 2 or x == 3) and y >= 4:
		f = False
	if f == True:
		print('yes')
	else:
		print('NO')


from sys import stdin
t = int(stdin.readline())
while t:
	(x, y) = map(int, stdin.readline().split())
	ans = False
	if y <= x:
		ans = True
	elif x != 1:
		if x == 2:
			if y == 3:
				ans = True
		elif x != 3:
			ans = True
	print('YES' if ans else 'NO')
	t -= 1


tc = int(input())
for ii in range(tc):
	(x, y) = map(int, input().split())
	c = 0
	if x == 1:
		if y <= 1:
			c = 1
	elif x == 2:
		if y <= 3:
			c = 1
	elif x == 3:
		if y <= 3:
			c = 1
	else:
		c = 1
	if c == 1:
		print('YES')
	else:
		print('NO')


for test in range(int(input())):
	(x, y) = [int(x) for x in input().split()]
	if x < y and (x == 1 and y > 1) or ((x == 2 or x == 3) and y > 3):
		print('NO')
	else:
		print('YES')


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


def main():
	(x, y) = map(int, input().split())
	if x > 3:
		print('YES')
	elif x is 1:
		print('YES' if y is 1 else 'NO')
	else:
		print('YES' if y <= 3 else 'NO')
t = int(input())
for _ in range(t):
	main()


tests = int(input())
while tests:
	tests -= 1
	(x, y) = map(int, input().split())
	if x > 3:
		print('YES')
	elif x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif y <= 3:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	nums = list(map(int, input().split()))
	x = nums[0]
	y = nums[1]
	if x >= y:
		print('YES')
		continue
	else:
		found = False
		old_x = x
		while x > 0:
			if x % 2 == 1:
				x -= 1
			x = 3 * x / 2
			if x >= y:
				print('YES')
				found = True
				break
			if old_x == x:
				break
			old_x = x
		if not found:
			print('NO')


t = int(input())
for test in range(t):
	[x, y] = list(map(int, input().split()))
	res = 'yes'
	if x == 1:
		if y == 1:
			print('yes')
		else:
			print('no')
	elif x <= 3:
		if y <= 3:
			print('yes')
		else:
			print('no')
	else:
		print('yes')


def gns():
	return list(map(int, input().split()))
t = int(input())
for i in range(t):
	(a, b) = gns()
	if a > 3:
		print('YES')
		continue
	if a == 3 or a == 2:
		if b < 4:
			print('YES')
			continue
		print('NO')
		continue
	if a == 1:
		if b == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	(x, y) = list(map(int, input().split(' ')))
	if x < y:
		if x == 1:
			print('NO')
		else:
			while x < y and x != 3:
				if x % 2 != 0:
					x -= 1
				x = 3 * x / 2
			if x >= y:
				print('YES')
			else:
				print('NO')
	else:
		print('YES')


t = int(input())
while t:
	(a, b) = map(int, input().split())
	cou = 0
	res = a
	lol = 0
	res = a
	if a == b:
		lol = 1
	if a > 1:
		if a % 2 and a < b:
			a -= 1
	cou = 0
	while a != 1:
		cou += 1
		if a % 2 == 0:
			a = a // 2
			a = a * 3
		if a >= b:
			lol = 1
			break
		if a % 2 and a > 1:
			a -= 1
		if cou > 50:
			lol = 0
			break
	if lol:
		print('YES')
	else:
		print('NO')
	t -= 1


from sys import stdin

def rl():
	return [int(w) for w in stdin.readline().split()]

def xuli(a, b):
	if a >= b:
		return 1
	if a == 1:
		return 0
	if a == 2 and b == 3:
		return 1
	if a <= 3:
		return 0
	return 1
test = int(stdin.readline())
while test > 0:
	test -= 1
	(a, b) = rl()
	res = xuli(a, b)
	if res == 0:
		print('NO')
	else:
		print('YES')


q = int(input())
for i in range(q):
	(x, y) = list(map(int, input().split(' ')))
	if x >= y:
		print('YES')
		continue
	while 1:
		if x % 2 == 0:
			x = x * 3 // 2
		else:
			x = (x - 1) * 3 // 2
		if x >= y:
			print('YES')
			break
		if x <= 3:
			print('NO')
			break


t = int(input())
s = []
a = [1, 2, 3]
for jngg in range(0, t):
	x = input()
	xx = x.split()
	x = int(xx[0])
	y = int(xx[1])
	if x == y:
		s.append('yes')
	elif x in a and y in a and (x != 1):
		s.append('yes')
	elif x in a and y not in a:
		s.append('no')
	elif x == 1:
		s.append('no')
	else:
		s.append('yes')
for i in s:
	print(i)


import sys
import math
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a <= 3:
		if a >= b <= 3 or (a == 2 and b == 3):
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


T = int(input())
for _ in range(T):
	(X, Y) = map(int, input().split())
	if X >= 4:
		print('YES')
	elif X in [2, 3]:
		if Y <= 3:
			print('YES')
		else:
			print('NO')
	else:
		assert X == 1
		if Y == 1:
			print('YES')
		else:
			print('NO')


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():
	(x, y) = rl()
	if x == 1 and y > x:
		print('NO')
		return
	if x >= y:
		print('YES')
		return
	if y <= 3:
		print('YES')
		return
	if x >= 4:
		print('YES')
		return
	print('NO')
mode = 'T'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


t = int(input())

def solve(a, b):
	if a >= b:
		return 'YES'
	if a == 1 or a == 3:
		return 'NO'
	if a == 2:
		if b == 3:
			return 'YES'
		return 'NO'
	return 'YES'
for _ in range(t):
	(a, b) = map(int, input().split())
	print(solve(a, b))


n = int(input())
for i in range(n):
	(a, b) = list(map(int, input().split()))
	if a == 2:
		a = 3
	if a >= 4:
		print('YES')
	elif a >= b:
		print('YES')
	else:
		print('NO')


t = int(input())
for x in range(t):
	l1 = [int(x) for x in input().split()]
	visited = []
	start = l1[0]
	end = l1[1]
	while start not in visited and start < end:
		visited.append(start)
		if start % 2:
			start -= 1
		else:
			start *= 3
			start = start // 2
	if start >= end:
		print('YES')
	else:
		print('NO')


q = int(input())
for i in range(q):
	(w, e) = map(int, input().split())
	r = set()
	while w < e:
		if w % 2:
			w -= 1
		else:
			w = w * 3 // 2
		if w in r:
			print('NO')
			break
		r.add(w)
	if w >= e:
		print('YES')


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	flag = True
	if x < y:
		if x == 2 and y != 3 or x == 3 or x == 1:
			flag = False
	print('YES' if flag else 'NO')


t = int(input())
while t:
	t -= 1
	(x, y) = map(int, input().split())
	if x == 1 and y != 1:
		print('NO')
		continue
	if x <= 3 and y > 3:
		print('NO')
		continue
	print('YES')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	seen = set()
	ok = True
	while x < y:
		if x in seen:
			ok = False
			break
		seen.add(x)
		if x % 2 == 0:
			if x > y:
				x -= 1
			else:
				x = 3 * x // 2
		elif x > 1:
			x -= 1
		else:
			ok = False
			break
	print('YES' if ok else 'NO')


T = int(input())
for i in range(0, T):
	(x, y) = map(int, input().split())
	if x >= 4:
		print('YES')
		continue
	elif x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif y <= 3:
		print('YES')
	else:
		print('NO')


from sys import stdin
for _ in range(int(stdin.readline())):
	(x, y) = map(int, stdin.readline().split())
	if y <= x:
		print('YES')
	elif x == 1:
		print('NO')
	else:
		ans = []
		if x % 2 == 0:
			pass
		else:
			ans.append(x)
		cond = False
		count = 0
		while x < y:
			if x in ans and count > 1:
				cond = True
				break
			else:
				if x % 2 == 0:
					pass
				else:
					ans.append(x)
					x -= 1
				ans.append(x)
				x = 3 * x // 2
			count += 1
		if cond == True:
			print('NO')
		else:
			print('YES')


t = int(input())
ans = []
for number in range(t):
	(x, y) = map(int, input().split())
	if x >= y or x > 3 or (x % 2 == 0 and x * (3 / 2) >= y) or (x % 2 == 1 and (x - 1) * (3 / 2) >= y):
		ans.append('YES')
	else:
		ans.append('NO')
for item in ans:
	print(item)


T = int(input())
while T > 0:
	(x, y) = [int(x) for x in input().split()]
	if x > 3:
		print('YES')
	elif x == 1:
		print('YES' if y == 1 else 'NO')
	elif y < 4:
		print('YES')
	else:
		print('NO')
	T -= 1


cases = int(input())
for cas in range(cases):
	(x, y) = map(int, input().split())
	if x == 1:
		if y == 1:
			print('yes')
		else:
			print('no')
	elif x == 2 or x == 3:
		if y == 1 or y == 2 or y == 3:
			print('yes')
		else:
			print('no')
	else:
		print('yes')


q = int(input())
for re in range(q):
	(a, b) = map(int, input().split())
	if a >= 4:
		print('YES')
	else:
		if a == 1:
			if b == 1:
				print('YES')
			else:
				print('NO')
		if a == 2 or a == 3:
			if b in [1, 2, 3]:
				print('YES')
			else:
				print('NO')


def highestPowerof2(n):
	res = 0
	for i in range(n, 0, -1):
		if i & i - 1 == 0:
			res = i
			break
	return res
for _ in range(int(input())):
	(x, y) = [int(i) for i in input().split()]
	pos = 0
	if x >= y:
		pos = 1
	res = x
	while 1:
		prev = res
		if res >= y:
			pos = 1
			break
		res = res - (res % 2 == 1)
		res = res * 3
		res = res // 2
		if prev == res:
			break
	if pos:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	f = 1
	if x >= y:
		f = 1
	else:
		p = x
		while x < y:
			if x % 2 == 0:
				x = 3 * x // 2
				if x <= p:
					f = 0
					break
			else:
				x = x - 1
				if x == p:
					f = 0
					break
	if f == 0:
		print('NO')
	else:
		print('YES')


import sys, math, queue, collections
MOD = 10 ** 9 + 7
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	ans = 'Yes'
	while x < y:
		if x % 2 == 0:
			x = 3 * (x // 2)
		else:
			x -= 1
		if x <= 3 and y != x:
			ans = 'No'
			break
	print(ans)


test = int(input())
result = []
for x in range(test):
	(a, b) = list(map(int, input().split()))
	if a == 3:
		if b > 3:
			result.append('NO')
			continue
	if a == 1:
		if b > 1:
			result.append('NO')
			continue
	if a == 2:
		if b > 3:
			result.append('NO')
			continue
	result.append('YES')
for x in result:
	print(x)


n = int(input())
for _ in range(n):
	(x, y) = map(int, input().split(' '))
	if x > 3:
		print('YES')
	elif x == 1 and y == 1:
		print('YES')
	elif x == 1 and y != 1:
		print('NO')
	elif x <= 3 and y < 4:
		print('YES')
	elif x <= 3 and y >= 4:
		print('NO')


for x in range(int(input())):
	(x, y) = list(map(int, input().split()))
	if x == 1 and y > 1:
		print('No')
	elif x <= 3 and y > 3:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	x = list(map(int, input().split()))
	m = x[0]
	prev = 0
	while x[1] > m or m == 0:
		if m % 2 == 0 and m < x[1]:
			prev = m
			m = m * 3 // 2
			if m == prev:
				break
		elif m % 2 == 1:
			m -= 1
			if m == prev:
				break
	if m >= x[1]:
		print('Yes')
	else:
		print('No')


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
MOD = 10 ** 9 + 7
INF = 10 ** 20
I = lambda : list(map(int, input().split()))
from collections import defaultdict as dd
from math import gcd
(t,) = I()
while t:
	t -= 1
	(x, y) = I()
	ans = 'YES'
	if x < y:
		if (x == 2 or x == 3) and (y != 2 and y != 3):
			ans = 'NO'
		if x == 1 and x != y:
			ans = 'NO'
	print(ans)


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if y <= x:
		print('YES')
		continue
	if x == 1:
		print('NO')
		continue
	if x == 2 and y != 3:
		print('NO')
		continue
	if x == 3:
		print('NO')
		continue
	if x % 2 == 1:
		x_prime = 3 * (x - 1) / 2
		if x_prime - x > 0:
			print('YES')
			continue
		else:
			print('NO')
			continue
	else:
		x_prime = 3 * x / 2
		if x_prime - x > 0:
			print('YES')
			continue
		else:
			print('NO')
			continue


import os
import sys
from io import BytesIO, IOBase

def readvars():
	k = map(int, input().split())
	return k

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

def anslist(li):
	ans = ' '.join([str(v) for v in li])
	return ans

def main():
	t = 1
	t = int(input())
	for xx in range(t):
		(x, y) = readvars()
		flg = 0
		if x == y:
			print('YES')
			continue
		if x == 1:
			print('NO')
		elif x == 2:
			if y == 3 or y == 1:
				print('YES')
			else:
				print('NO')
		elif x == 3:
			if y == 2 or y == 1:
				print('YES')
			else:
				print('NO')
		else:
			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')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
while t > 0:
	w = input().split()
	x = int(w[0])
	y = int(w[1])
	if x >= y:
		print('yes')
	elif (x == 3 or x == 2) and y >= 4:
		print('no')
	elif x == 1 and y > 1:
		print('no')
	else:
		print('yes')
	t -= 1


for i in range(int(input())):
	(x, y) = map(int, input().split())
	ls = [1, 2, 3]
	ans = ''
	if x == 1 and x < y or (x in ls and y not in ls):
		ans = 'NO'
	else:
		ans = 'YES'
	print(ans)


for _ in range(int(input())):
	(start_num, end_num) = map(int, input().split())
	if end_num <= start_num:
		print('yes')
		continue
	used = [start_num]
	result = False
	while start_num < end_num:
		if start_num % 2 == 0:
			start_num = start_num * 3 / 2
		else:
			start_num -= 1
		if start_num in used:
			break
		used.append(start_num)
		if start_num >= end_num:
			result = True
			break
	print('yes' if result else 'no')


from math import ceil
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x >= y:
		print('Yes')
	elif x > 3 or 3 * (x / 2) == y:
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	(a, b) = map(int, input().split())
	if a >= b:
		print('YES')
	elif a % 2 == 0:
		if a * 1.5 >= b or a * 1.5 - a > 1:
			print('YES')
		else:
			print('NO')
	else:
		a -= 1
		if a * 1.5 >= b or a * 1.5 - a > 1:
			print('YES')
		else:
			print('NO')


(OK, NG) = ('YES', 'NO')

def solve():
	(x, y) = map(int, input().split())
	if x == 1:
		if y > 1:
			return NG
	elif x <= 3:
		if y > 3:
			return NG
	return OK

def main():
	q = int(input())
	for _ in range(q):
		print(solve())
main()


n = int(input())
ar = []
for i in range(n):
	s = input()
	ar1 = s.split(' ')
	ar2 = [int(ar1[0]), int(ar1[1])]
	ar.append(ar2)
for i in range(n):
	x = ar[i][0]
	y = ar[i][1]
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	if x == 2 or x == 3:
		if y == 1 or y == 2 or y == 3:
			print('YES')
		else:
			print('NO')
	if x > 3:
		print('YES')


for i in range(int(input())):
	(x, y) = map(int, input().split())
	if y == x:
		print('YES')
	elif y < x:
		print('YES')
	else:
		test = 0
		while x < y:
			t = x
			if x % 2 != 0:
				x = x - 1
			x = 3 * x // 2
			if x == y:
				break
			elif t == x:
				test = 1
				print('NO')
				break
		if test == 0:
			print('YES')


from math import *
from collections import *
import sys
sys.setrecursionlimit(10 ** 9)
t = int(input())
for y in range(t):
	(x, y) = map(int, input().split())
	if x == y:
		print('YES')
	elif x > 3:
		print('YES')
	elif x == 1:
		print('NO')
	elif y <= 3:
		print('YES')
	else:
		print('NO')


from collections import defaultdict
from math import inf as INFINITY

def solve(x, y):
	if y <= x:
		return 'YES'
	if x == 2 and y == 3:
		return 'YES'
	if x <= 3:
		return 'NO'
	return 'YES'
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	print(solve(a, b))


for _ in range(int(input())):
	(x, y) = tuple(map(int, input().split()))
	if x >= y:
		print('YES')
	elif x in [1, 2, 3] and (not y in [1, 2, 3]) or x == 1:
		print('NO')
	else:
		print('YES')


nbt = int(input())
for _ in range(nbt):
	(x, y) = [int(x) for x in input().split()]
	ans = 'YES'
	if x == 1 and y != 1:
		ans = 'NO'
	elif x in [2, 3] and y >= 4:
		ans = 'NO'
	print(ans)


def main():
	answer = ''
	for query in range(int(input())):
		ans = None
		(x, y) = list(map(int, input().split(' ')))
		if x == 1:
			if y in {1}:
				ans = 'YES'
			else:
				ans = 'NO'
		elif x == 2 or x == 3:
			if y in {1, 2, 3}:
				ans = 'YES'
			else:
				ans = 'NO'
		else:
			ans = 'YES'
		answer += str(ans) + '\n'
	print(answer)
main()


from collections import defaultdict, deque
from itertools import permutations
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
from copy import deepcopy
int_input = lambda : int(stdin.readline())
string_input = lambda : stdin.readline()
multi_int_input = lambda : map(int, stdin.readline().split())
multi_input = lambda : stdin.readline().split()
list_input = lambda : list(map(int, stdin.readline().split()))
string_list_input = lambda : list(string_input())
MOD = pow(10, 9) + 7
test = int_input()
for _ in range(test):
	(x, y) = multi_int_input()
	if x > y:
		print('YES')
	elif x == y:
		print('YES')
	elif x < y:
		if x == 2 and y == 3:
			print('YES')
		elif x >= 4:
			print('YES')
		else:
			print('NO')


t = int(input())
while t:
	(x, y) = map(int, input().split())
	print(['NO', 'YES'][x == y or x >= y or x > 3 or (x == 2 and y == 3)])
	t -= 1


t = int(input())
for _ in range(t):
	out = 'YES'
	(x, y) = list(map(int, input().split(' ')))
	if x == 1:
		if y != 1:
			out = 'NO'
	elif x == 2:
		if y not in {1, 2, 3}:
			out = 'NO'
	elif x == 3:
		if y not in {1, 2, 3}:
			out = 'NO'
	print(out)


t = int(input())
while t > 0:
	t -= 1
	h = {}
	(x, y) = map(int, input().split())
	while True:
		if h.get(x) == None:
			h[x] = True
		else:
			print('NO')
			break
		if x == y:
			print('YES')
			break
		elif x < y:
			if x % 2 == 0:
				x += x / 2
			else:
				x -= 1
		else:
			print('YES')
			break


testcases = int(input())
input_dict = {}
for i in range(testcases):
	input_dict[i] = []
	input_dict[i].append(input())
for value in input_dict.values():
	x = int(value[0].split()[0])
	y = int(value[0].split()[1])
	if x == y:
		print('YES')
	elif x > y:
		print('YES')
	elif x == 1:
		print('NO')
	elif x <= 3:
		if y >= 4:
			print('NO')
		else:
			print('YES')
	elif x >= 4:
		print('YES')


arr = [list(map(int, input().split(' '))) for i in range(int(input()))]
for para in arr:
	if para[0] == 1 and para[1] != 1:
		print('NO')
	elif para[0] == 2 and para[1] > 3:
		print('NO')
	elif para[0] == 3 and para[1] > 3:
		print('NO')
	else:
		print('YES')


q = int(input())

def func(x, y):
	used = []
	if x == 1 and y == 1:
		return 'YES'
	elif x == 1:
		return 'NO'
	while True:
		if x in used:
			return 'NO'
		if x == y:
			return 'YES'
		if x > y:
			return 'YES'
		if x % 2 != 0 and x > 1:
			used.append(x)
			x -= 1
			continue
		if x % 2 == 0:
			x = 3 * x // 2
for z in range(q):
	(x, y) = list(map(int, input().split()))
	print(func(x, y))


t = int(input())
for tst in range(t):
	(x, y) = map(int, input().split())
	if x >= y:
		print('Yes')
	elif x >= 4:
		print('Yes')
	elif x == 1 or x == 3 or (x == 2 and y > 3):
		print('No')
	elif x == 2 and y == 3:
		print('Yes')


from datetime import datetime
import math

class Read:

	@staticmethod
	def string():
		return input()

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def list(sep=' '):
		return input().split(sep)

	@staticmethod
	def list_int(sep=' '):
		return list(map(int, input().split(sep)))

def solve():
	(x, y) = Read.list_int()
	if x >= y:
		print('YES')
	elif x == 1:
		print('NO')
	else:
		x_new = x if x % 2 == 0 else x - 1
		x2_new = x_new * 1.5
		x3_new = x2_new if x2_new % 2 == 0 else x2_new - 1
		if x2_new >= y:
			print('YES')
		else:
			print('NO' if x3_new <= x_new else 'YES')
query_count = Read.int()
while query_count:
	query_count -= 1
	solve()


def main():

	def solve():
		(x, y) = map(int, input().split())
		if x >= y:
			print('YES')
			return
		if x > 3:
			print('YES')
			return
		if x > 1 and y <= 3:
			print('YES')
			return
		print('NO')
	q = int(input())
	for _ in range(q):
		solve()
main()


ll = lambda : map(int, input().split())
t = lambda : int(input())
ss = lambda : input()
lx = lambda x: map(int, input().split(x))
for _ in range(t()):
	(x, y) = ll()
	if x == 1 and y == 1:
		print('YES')
	elif (x == 2 or x == 3) and y <= 3:
		print('YES')
	elif x > 3:
		print('YES')
	else:
		print('NO')


def main():
	for _ in range(int(input())):
		(x, y) = map(int, input().split())
		s = set()
		while y > x not in s:
			s.add(x)
			x += -1 if x & 1 else x // 2
		print(('YES', 'NO')[x < y])
main()


import sys, math
input = sys.stdin.readline

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

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

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

def invr():
	(a, b) = map(int, input().split())
	return (a, b)
t = 1
t = int(input())
for i in range(t):
	(x, y) = invr()
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif x <= 3:
		if y <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
for j in range(t):
	(x, y) = [int(i) for i in input().split()]
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif x <= 3:
		if y <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


test = int(input())
while test:
	(a, b) = map(int, input().split())
	if a == b:
		print('YES\n')
	elif a == 2 and (b == 1 or b == 2 or b == 3):
		print('YES\n')
	elif a == 3 and (b == 3 or b == 2 or b == 1):
		print('YES\n')
	elif a > 3:
		print('YES\n')
	else:
		print('NO\n')
	test -= 1


for i in range(int(input())):
	x = input().split()
	if int(x[0]) == 1 and int(x[1]) != 1:
		print('NO')
	elif int(x[0]) < 4 and int(x[1]) < 4:
		print('YES')
	elif int(x[0]) < 4 and int(x[1]) > 3:
		print('NO')
	else:
		print('YES')


def rint():
	return int(input())

def rints():
	return list(map(int, input().split()))
t = rint()
for _ in range(t):
	(x, y) = rints()
	if x == 1:
		r = y == 1
	elif x == 2 or x == 3:
		r = y <= 3
	else:
		r = True
	print('YES' if r else 'NO')


k = int(input())
ans = []
for i in range(k):
	l = input().split()
	x = int(l[0])
	y = int(l[1])
	if x == 1 and y == 1:
		ans.append('YES')
	elif x == 1 and y != 1:
		ans.append('NO')
	elif 3 == x and y > x:
		ans.append('NO')
	elif x == 2 and y != 3 and (y > x):
		ans.append('NO')
	else:
		ans.append('YES')
for i in ans:
	print(i)


ii = lambda : int(input())
iia = lambda : list(map(int, input().split()))
isa = lambda : list(input().split())
t = ii()
for i in range(t):
	(x, y) = iia()
	if x == 1 and y > 1 or (x == 3 and y > 3) or (x == 2 and y > 3):
		print('NO')
	else:
		print('YES')


k = int(input())
for _ in range(k):
	(a, b) = map(int, input().split())
	if a >= b:
		print('YES')
	elif a == 1:
		print('NO')
	else:
		s = set([a])
		while 1:
			if a % 2:
				a -= 1
			else:
				a = 3 * a // 2
			if a >= b:
				print('YES')
				break
			if a in s:
				print('NO')
				break


T = int(input())
for t in range(T):
	(x, y) = map(int, input().split())
	if x > 3:
		print('YES')
	elif x == 1:
		print('YES' if y == 1 else 'NO')
	else:
		print('YES' if y <= 3 else 'NO')


def magic(x, y):
	if x >= y:
		return 'YES'
	elif x == 1 or x == 3:
		return 'NO'
	elif x == 2 and y > 3:
		return 'NO'
	return 'YES'
for _ in range(int(input())):
	(x, y) = list(map(int, input().split()))
	print(magic(x, y))


def wa(b):
	return 3 * b // 2

def ans(b):
	return b - 1
magi = int(input())
for i in range(1, magi + 1, 1):
	(a, b) = map(int, input().split())
	c = wa(a)
	if a > 3:
		print('YES')
	elif a == 1 and b == 1:
		print('YES')
	elif a == 1 and b != 1:
		print('NO')
	elif b <= 3:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y) = [int(i) for i in input().split()]
	flag = False
	d = abs(x - y)
	j = 0
	if x == y:
		flag = True
	else:
		while x != 1:
			if x % 2 == 0 and x < y:
				x *= 1.5
			elif x > 1:
				x -= 1
			if x >= y:
				flag = True
				break
			j += 1
			if j == 100:
				break
	if flag:
		print('YES')
	else:
		print('NO')


import math
from sys import stdin
c = int(stdin.readline().strip())
for _ in range(c):
	(a, b) = [int(x) for x in stdin.readline().strip().split(' ')]
	if a >= b:
		print('YES')
	elif a <= 3 and b != 3 or a == 1:
		print('NO')
	else:
		print('YES')


import sys

def main():
	for _ in range(int(input())):
		(a, b) = [int(x) for x in sys.stdin.readline().split()]
		if a >= b:
			print('YES')
		elif a == 2 and b == 3:
			print('YES')
		elif a == 1 or a == 3 or a == 2:
			print('NO')
		else:
			print('YES')
main()


t = int(input())
output = []
for _ in range(t):
	(x, y) = map(int, input().split())
	if x == y:
		output.append('YES')
	elif x > y:
		output.append('YES')
	elif x == 1:
		output.append('NO')
	elif x == 2 and y != 3:
		output.append('NO')
	elif x == 3:
		output.append('NO')
	else:
		output.append('YES')
for x in output:
	print(x)


from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	if a >= b:
		print('YES')
	elif a == 1:
		print('NO')
	elif a == 2 and b == 3:
		print('YES')
	elif a == 2 and b > 3:
		print('NO')
	elif a == 3:
		print('NO')
	else:
		print('YES')


def main():
	for _ in range(int(input())):
		x = [int(i) for i in input().split()]
		y = [x[0]]
		while True:
			if x[1] <= y[-1]:
				print('YES')
				break
			if y[-1] % 2 == 0:
				if y[-1] * 3 // 2 in y:
					print('NO')
					break
				y.append(y[-1] * 3 // 2)
			else:
				if y[-1] - 1 in y:
					print('NO')
					break
				y.append(y[-1] - 1)
main()


def main():
	T = int(input())
	for kase in range(T):
		(a, b) = map(int, input().split())
		max_val = 0
		for i in range(100):
			max_val = max(max_val, a)
			a = a // 2 * 3
		print('YES' if b <= max_val else 'NO')
	return 0
main()


for z in range(int(input())):
	(x, y) = map(int, input().split())
	if y <= x:
		print('YES')
		continue
	elif x > 3:
		print('YES')
	elif x == 2 and y == 3:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if x == 1 and y > 1:
		print('NO')
	elif x == y:
		print('Yes')
	elif x > 3:
		print('YES')
	elif x * 1.5 == y:
		print('YES')
	elif x > y:
		print('YES')
	else:
		print('NO')


from sys import stdin

def rl():
	return [int(w) for w in stdin.readline().split()]
(t,) = rl()
for _ in range(t):
	(x, y) = rl()
	print('YES' if x > 3 or (x > 1 and y <= 3) or y == 1 else 'NO')


import math
import sys
from collections import defaultdict, Counter
from functools import lru_cache
t = int(input())
for _ in range(t):
	(x, y) = [int(i) for i in input().split()]
	if x % 2 == 0:
		if x > 2:
			print('Yes')
		elif y <= 3:
			print('Yes')
		else:
			print('No')
	elif x > 3:
		print('Yes')
	elif x == 1:
		if y == 1:
			print('Yes')
		else:
			print('No')
	elif x == 3:
		if y <= 3:
			print('Yes')
		else:
			print('No')


t = int(input())
for _ in range(t):
	args = [int(x) for x in input().split(' ')]
	x = args[0]
	y = args[1]
	if x >= y:
		print('YES')
	elif x < 4 and (not (x == 2 and y == 3)):
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	t -= 1
	(x, y) = map(int, input().split(' '))
	mx = x
	while x < y:
		x = x // 2
		x *= 3
		if x <= mx:
			break
		else:
			mx = x
		if x > 5:
			x = y
			break
	if x < y:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if x >= 4:
		print('YES')
		continue
	elif x == 3 or x == 2:
		if y <= 3:
			print('YES')
			continue
	elif y == 1:
		print('YES')
		continue
	print('NO')


for i in range(int(input())):
	(a, b) = (int(x) for x in input().split())
	s = 'Yes'
	if a <= 3 and a != b:
		s = 'No'
	if a == 2 and b == 3 or a > b:
		s = 'Yes'
	print(s)


y = 'yes'
n = 'no'
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a == 1 and b == 1:
		print(y)
	elif a == 1 and b > 1:
		print(n)
	elif a > b:
		print(y)
	elif a == 2 and b > 3:
		print(n)
	else:
		t1 = a
		t2 = b
		flag = 'notok'
		m = 0
		for i in range(10):
			if a % 2 == 0:
				a = 3 * a // 2
			else:
				a -= 1
			if a >= b:
				flag = 'ok'
			m = max(m, a)
		if flag == 'ok':
			print(y)
		elif m - t1 > 1:
			print(y)
		else:
			print(n)


import math
testCases = int(input())
for t in range(testCases):
	(initNumber, finalNumber) = tuple(map(int, input().split(' ')))
	if initNumber == 1:
		finalReach = 1
	elif initNumber < 4:
		finalReach = 3
	else:
		finalReach = math.inf
	if finalNumber <= finalReach:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	(a, b) = map(int, input().split())
	if a == b or (a > b and a > 1):
		print('YES')
	elif a < 4:
		if a == 2 and b == 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')
	t -= 1


cases = int(input())
for _ in range(cases):
	(a, b) = map(int, input().split())
	if a > 3:
		print('YES')
	elif a == 1:
		if b == 1:
			print('YES')
		else:
			print('NO')
	elif b <= 3:
		print('YES')
	else:
		print('NO')


t = int(input())
rA = []
for zz in range(t):
	(a, b) = [int(i) for i in input().split()]
	cP = 0
	while a >= 2 ** cP:
		cP += 1
	cP -= 1
	if a >= b or cP > 1 or 2 ** (cP + 1) - 1 >= b:
		rA.append('YES')
	else:
		rA.append('NO')
for i in rA:
	print(i)


import sys
input = sys.stdin.readline
Q = int(input())
Query = [list(map(int, input().split())) for _ in range(Q)]
for (a, b) in Query:
	ok = False
	used = {a}
	while 0 < a < b:
		if a % 2 == 0:
			a = a // 2 * 3
		elif a > 0:
			a -= 1
		if a in used:
			a = 0
			break
		used.add(a)
	print('YES' if a >= b else 'NO')


import sys
input = sys.stdin.buffer.readline
q = int(input())
for _ in range(q):
	(a, b) = map(int, input().split())
	if a > 3:
		print('YES')
	elif a >= b:
		print('YES')
	elif a == 2 and b == 3:
		print('YES')
	else:
		print('NO')


def find(a, b):
	while a > 0:
		if a >= b:
			return True
		if a == 3 * (a - 1) / 2:
			return False
		elif a != 3 * (a - 1) / 2:
			if a % 2 == 0:
				a = 3 * a / 2
			else:
				a = a - 1
	return False
T = int(input(''))
A = []
for i in range(T):
	(x, y) = input('').split(' ')
	a = (int(x), int(y))
	A.append(a)
for i in A:
	a = i[0]
	b = i[1]
	if find(a, b):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if y <= x:
		print('Yes')
	elif x == 1:
		print('No')
	elif x == 2 and y == 3:
		print('YEs')
	elif x <= 3:
		print('No')
	else:
		print('Yes')


q = int(input())
in_data = []
for _ in range(q):
	in_data.append([int(i) for i in input().split()])
for (x, y) in in_data:
	if x in [2, 3] and 3 < y:
		print('NO')
	elif x in [0, 1] and x != y:
		print('NO')
	else:
		print('YES')


T = int(input())
res = []
for i in range(T):
	(x, y) = map(int, input().split(' '))
	if x == 1 and y > 1:
		res.append('NO')
	elif x == 2 and y > 3:
		res.append('NO')
	elif x == 3 and y > 3:
		res.append('NO')
	else:
		res.append('YES')
for s in res:
	print(s)


import sys
import collections
from collections import Counter
import itertools
import math
import timeit

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=1):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors

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 flin(d, x, default=-1):
	left = right = -1
	for i in range(len(d)):
		if d[i] == x:
			if left == -1:
				left = i
			right = i
	if left == -1:
		return (default, default)
	else:
		return (left, right)

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

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

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

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

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

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)
t = ii()
for _ in range(t):
	(x, y) = mi()
	if x == 1 and y > 1:
		print('NO')
		continue
	if x <= 3 and y > 3:
		print('NO')
		continue
	print('YES')


t = int(input())
while t:
	(m, n) = map(int, input().split())
	if m > 3:
		print('YES')
	elif n <= m:
		print('YES')
	elif n == 3 and m == 2:
		print('YES')
	else:
		print('NO')
	t -= 1


n = int(input())
for i in range(n):
	(x, y) = map(int, input().split(' '))
	if x >= y:
		print('YES')
	else:
		while x % 2 == 0 and x < y:
			x = 3 * x / 2
		if x >= y:
			print('YES')
		elif x <= 3:
			print('No')
		else:
			print('YES')


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt
import unittest

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

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
for t in range(read_int()):
	(x, y) = read_int_array()
	if x == 1:
		print('YES' if y == 1 else 'NO')
	elif x == 2 or x == 3:
		print('YES' if y <= 3 else 'NO')
	else:
		print('YES')


from sys import stdin

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

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

def main():
	t = iin()
	while t:
		t -= 1
		(x, y) = lin()
		if x < y:
			if x == 1:
				print('NO')
			elif x == 2 and y > 3 or (x == 3 and y > 3):
				print('NO')
			else:
				print('YES')
		else:
			print('YES')
main()


from sys import stdin, stdout

def calculate(first, second):
	if first == second:
		return 'YES'
	l = []
	while first < second:
		if first in l:
			return 'NO'
		else:
			l.append(first)
		if first % 2 == 0:
			first = first * 3 / 2
		else:
			first -= 1
		if first <= 0:
			return 'NO'
	return 'YES'
test_cases = int(stdin.readline())
for i in range(test_cases):
	line = list(map(int, stdin.readline().split(' ')))
	first = line[0]
	second = line[1]
	res = calculate(first, second)
	stdout.write(str(res) + '\n')


n = int(input())
for i in range(n):
	(x, y) = map(int, input().split())
	if x >= y:
		print('Yes')
	elif x == 2 and y == 3:
		print('Yes')
	elif x < 4:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(a, b) = input().split()
	(a, b) = (int(a), int(b))
	ans = 0
	if a >= b or (a == 2 and b == 3):
		ans = 1
	elif a % 2 == 0 and a > 2:
		ans = 1
	else:
		p = a - 1
		k = 3 * p
		k = int(k / 2)
		if k > a:
			ans = 1
		else:
			ans = 0
	if ans == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
a = []
for i in range(t):
	s = list(map(int, input().split()))
	a.append(s)

def judge(x, y):
	if x == 1:
		if y == 1:
			return 'yes'
		else:
			return 'no'
	elif x == 2 or x == 3:
		if y > 3:
			return 'no'
		else:
			return 'yes'
	else:
		return 'yes'
for j in range(t):
	print(judge(a[j][0], a[j][1]))


import sys
ip = lambda : sys.stdin.readline().rstrip()
from collections import *
for _ in range(int(ip())):
	(x, y) = map(int, ip().split())
	ans = False
	if y <= x:
		ans = True
	elif y > x:
		if x > 3:
			ans = True
		elif x == 2 and y == 3:
			ans = True
	if ans:
		print('yes')
	else:
		print('no')


n = int(input())
for i in range(n):
	(x, y) = map(int, input().split())
	c = 0
	z = []
	if x >= y:
		print('YES')
	else:
		while x < y + 2:
			if x % 2 == 0:
				x = 3 * x // 2
				if x not in z:
					z.append(x)
				else:
					c = 2
					break
			else:
				x = x - 1
				if x not in z:
					z.append(x)
				else:
					c = 2
					break
			if x >= y:
				c = 1
				break
	if c == 1:
		print('YES')
	elif c == 2:
		print('NO')


tent = eval(input())
for i in range(tent):
	(x, y) = map(int, input().split())
	if x > 3:
		print('yes')
	elif x >= y:
		print('yes')
	elif x == 2 and y == 3:
		print('yes')
	else:
		print('no')


def solve(x, y):
	if x > 3:
		print('YES')
	elif x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	elif y <= 3:
		print('YES')
	else:
		print('NO')
testno = int(input())
while testno:
	testno -= 1
	(x, y) = input().split(' ')
	solve(int(x), int(y))


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if x == 1:
		if y == 1:
			print('yes')
			continue
		print('no')
		continue
	if x <= 3:
		if y <= 3:
			print('yes')
			continue
		print('no')
		continue
	print('yes')


for i in [0] * int(input()):
	(a, b) = map(int, input().split())
	print(['yes', *['nyoe s'[a == 1 and b == 1::2]]][a <= 3 and 3 * (a // 2) < b])


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x >= y:
		print('yes')
	elif x >= 4:
		print('yes')
	elif x < y:
		if x == 0:
			print('no')
		elif x == 2 and y > 3:
			print('no')
		else:
			x = 3 * x / 2
			if x - round(x) != 0:
				print('no')
			elif x >= y:
				print('yes')


t = int(input().strip())
for i in range(t):
	(x, y) = map(int, input().strip().split())
	if x >= y:
		print('yes')
	elif x <= 3 and y > 3:
		print('no')
	elif x == 1:
		print('no')
	else:
		print('yes')


for i in range(int(input())):
	(x, y) = map(int, input().split())
	if x >= y:
		print('Yes')
	else:
		z = []
		while x < y and x > 1:
			if x in z:
				break
			else:
				z.append(x)
				if x % 2 == 0:
					x = x * 1.5
				elif x > 1:
					x -= 1
		if x >= y:
			print('Yes')
		else:
			print('No')


import sys, math

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

def main():
	q = int(input())
	for _ in range(q):
		(x, y) = map(int, input().split())
		if x == 1:
			if y == 1:
				print('YES')
			else:
				print('NO')
		elif x <= 3:
			if y <= 3:
				print('YES')
			else:
				print('NO')
		else:
			print('YES')
main()


n = int(input())
ss = []
for i in range(n):
	ss += [list(map(int, input().split(' ')))]
for i in range(n):
	x = ss[i][0]
	y = ss[i][1]
	if x >= 4:
		print('YES')
	elif x == 3 and y <= 3:
		print('YES')
	elif x == 2 and y <= 3:
		print('YES')
	elif x == 1 and y == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for query in range(t):
	(x, y) = map(int, input().split())
	if y <= x:
		print('YES')
	else:
		found = False
		while True:
			if x % 2 == 0 and x >= 3 * x / 2 - 1 and (y > 3 * x / 2):
				break
			if x % 2 == 0:
				x = 3 * x / 2
				if x >= y:
					print('YES')
					found = True
					break
			else:
				x -= 1
				if x >= 3 * x / 2 - 1 and y > 3 * x / 2:
					break
				x = 3 * x / 2
				if x >= y:
					print('YES')
					found = True
					break
		if not found:
			print('NO')


t = int(input())
a = []
for i in range(t):
	b = list(map(int, input().split()))
	a.append(b)
for i in a:
	x = i[0]
	y = i[1]
	if y < 1:
		print('NO')
	elif x == y:
		print('YES')
	elif x == 1:
		print('NO')
	elif x == 2:
		if y == 1 or y == 3:
			print('YES')
		else:
			print('NO')
	elif x == 3:
		if y > x:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


import sys
input = lambda : sys.stdin.readline().rstrip()
T = int(input())
for _ in range(T):
	(x, y) = map(int, input().split())
	if x >= y:
		print('yes')
	elif x == 1:
		print('no')
	elif x == 2 and y != 3:
		print('no')
	elif x == 3 and y != 2:
		print('no')
	else:
		print('yes')


def examB():
	T = I()
	for _ in range(T):
		(x, y) = LI()
		if x == 1 and y != 1:
			ans = 'NO'
		elif x <= 3 and y >= 4:
			ans = 'NO'
		else:
			ans = 'YES'
		print(ans)
import sys
import copy
import bisect
import heapq
from collections import Counter, defaultdict, deque

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

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

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

def S():
	return sys.stdin.readline().strip()
mod = 10 ** 9 + 7
inf = float('inf')
examB()


import math
t = int(input())
while t:
	v = input().split(' ')
	x = int(v[0])
	y = int(v[1])
	if y <= x:
		print('YES')
	elif x == 1:
		print('NO')
	elif x <= 3:
		if y > 3:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')
	t -= 1


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')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7
ans = []
for _ in range(INT()):
	(x, y) = MAP()
	if x == 1:
		if y == 1:
			ans.append('yes')
		else:
			ans.append('no')
	elif x == 2 or x == 3:
		if y <= 3:
			ans.append('yes')
		else:
			ans.append('no')
	else:
		ans.append('yes')
print('\n'.join(ans))


import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
	(x, y) = nm()
	if x == 1 and y > 1 or (x < 4 and y > 3):
		print('NO')
	else:
		print('YES')
	return
T = ni()
for _ in range(T):
	solve()


import math
t = int(input())
while t:
	(x, y) = map(int, input().split())
	if x >= y:
		print('YES')
	else:
		d = {x: 1}
		c = 0
		while x < y:
			if x % 2 == 0:
				a = 3 * x // 2
				if a == y:
					break
				try:
					if d[a] == 1:
						c = 1
						break
				except KeyError:
					x = a
					d[a] = 1
			else:
				a = x - 1
				if a == y:
					break
				try:
					if d[a] == 1:
						c = 1
						break
				except KeyError:
					x = a
					d[a] = 1
		if x >= y:
			print('YES')
		elif c == 0:
			print('YES')
		else:
			print('NO')
	t -= 1


for i in range(int(input())):
	(x, y) = list(map(int, input().split()))
	if x > 3 and y > 3 or x >= y or [x, y] == [2, 3]:
		print('yes')
	else:
		print('no')


test = int(input())
for t in range(test):
	(x, y) = map(int, input().split())
	if x >= y:
		print('Yes')
	elif x == 2 and y == 3:
		print('Yes')
	elif x == 2 and y == 1:
		print('Yes')
	elif x == 3 or x == 1 or x == 2:
		print('No')
	else:
		print('Yes')


from collections import Counter
from collections import defaultdict
import math
t = int(input())
for i in range(0, t):
	(a, b) = list(map(int, input().split()))
	l = [1, 2, 3]
	if a in l:
		if a == 1 and b == 1:
			print('YES')
		elif (a == 2 or a == 3) and b <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


from sys import stdin, stdout
for i in stdin:
	t = int(i)
	break
for i in range(t):
	for i in stdin:
		(x, y) = map(int, i.strip().split())
		break
	if x > 3:
		stdout.write('Yes\n')
	elif x == 3:
		if y <= 3:
			stdout.write('Yes\n')
		else:
			stdout.write('No\n')
	elif x == 2:
		if y <= 3:
			stdout.write('Yes\n')
		else:
			stdout.write('No\n')
	elif x == 1:
		if y <= 1:
			stdout.write('Yes\n')
		else:
			stdout.write('No\n')


t = int(input())
for i in range(t):
	l = set()
	f = 1
	(a, b) = map(int, input().split())
	while a < b:
		if a % 2 != 0:
			a -= 1
		else:
			a = 3 * a // 2
		if a in l:
			print('NO')
			f = 0
			break
		l.add(a)
	if f:
		print('YES')


import sys
t = int(sys.stdin.readline())
for i in range(t):
	(x, y) = list(map(int, sys.stdin.readline().strip().split()))
	f = 1
	if x == y:
		f = 1
	elif x == 1:
		if y == 0:
			f = 1
		else:
			f = 0
	elif x == 2 or x == 3:
		if y == 1 or y == 0 or y == 3 or (y == 2):
			f = 1
		else:
			f = 0
	else:
		f = 1
	if f:
		print('YES')
	else:
		print('NO')


from sys import stdin

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

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

def linput():
	return list(map(int, stdin.readline().split()))
for _ in range(input()):
	(x, y) = minput()
	while 1 < x < y:
		if x == 2 and y > 3:
			break
		elif x == 2:
			x = y
			break
		if x % 2 == 0:
			x = x * 3 / 2
		else:
			x -= 1
	if x < y:
		print('NO')
	else:
		print('YES')


def fun(x):
	i = 0
	while pow(2, i) <= x:
		i += 1
	i -= 1
	return i
t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	else:
		val = x
		prev_pow = -1
		cur_pow = 0
		while prev_pow is not cur_pow and x <= pow(10, 9):
			prev_pow = cur_pow
			cur_pow = fun(x)
			x = pow(3, cur_pow)
		if x < y:
			print('NO')
		else:
			print('YES')


k = int(input())
result = []
for o in range(k):
	(x, y) = [int(a) for a in input().split()]
	if y <= x or (x == 2 and y == 3):
		result.append('yes')
	elif x <= 3:
		result.append('no')
	else:
		result.append('yes')
print('\n'.join([str(a) for a in result]))


for _ in '0' * int(input()):
	(x, y) = map(int, input().split())
	c = 'YES'
	if x == 1 and y != 1 or ((x == 2 or x == 3) and y > 3):
		c = 'NO'
	print(c)


from sys import setrecursionlimit
setrecursionlimit(10 ** 9)

def solve(x):
	if x in s:
		return False
	if x >= y:
		return True
	s.append(x)
	if x % 2:
		return solve(x - 1)
	return solve(3 * x // 2)
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	s = [0]
	print('YES' if solve(x) else 'NO')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	if a % 2 == 0:
		a = a // 2
		a = a * 3
	if a >= b or a > 3:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	(x, y) = [int(__) for __ in input().split()]
	if x == 2 and y == 3:
		print('YES')
		continue
	if x > 3:
		print('YES')
		continue
	elif y <= x:
		print('YES')
	else:
		print('NO')


n = int(input())
a = [[int(i) for i in input().split()] for m in range(n)]

def s1(x):
	x = 3 * x / 2

def s2(x):
	x -= 1
for i in a:
	if i[0] >= i[1]:
		print('YES')
	elif i[0] == 3 and i[1] > 3:
		print('NO')
	elif i[0] == 2 and i[1] > 3:
		print('NO')
	elif i[0] == 1 and i[1] != 1:
		print('NO')
	else:
		print('YES')


import sys
sys.setrecursionlimit(2000)
from collections import Counter
from functools import reduce

def is_even(n):
	return n % 2 == 0

def even_magic(n):
	return 3 * x / 2

def gt_magic(n):
	return n - 1
total_test_cases = int(sys.stdin.readline().rstrip())
for _ in range(total_test_cases):
	test_case = [int(val) for val in sys.stdin.readline().rstrip().split()]
	(x, y) = test_case
	if x == y or x > y:
		print('YES')
		continue
	if y <= 0:
		print('NO')
		continue
	seen_x = set([x])
	while x < y:
		if is_even(x):
			x = 3 * x / 2
		elif x > 1:
			x -= 1
		if x in seen_x:
			print('NO')
			break
		else:
			seen_x.add(x)
		if x > y or x == y:
			print('YES')
			break


a = int(input())
j = -3
for i in range(a):
	(x, y) = map(int, input().split())
	while True:
		if x == y:
			break
		if j >= x:
			break
		if x <= 1 and y > 0:
			break
		if x < y:
			if x > 3:
				x = y
				break
			elif x % 2 == 0:
				x *= 1.5
			else:
				x -= 1
		else:
			x = y
			j -= 30
		j += 1
	if x == y:
		print('YES')
	else:
		print('NO')
	j = -3


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	a = x
	while a < y:
		if a % 2 == 0:
			a = int(3 * a / 2)
		else:
			a = a - 1
		if a == x or a == 0:
			break
	if a >= y:
		print('YES')
	else:
		print('NO')


from sys import stdin
for _ in range(int(input())):
	res = 'YES'
	(a, b) = list(map(int, stdin.readline().split()))
	if a <= 3 and b > a:
		if a != 2 or b != 3:
			res = 'NO'
	print(res)


def poss(a, b):
	if a >= b:
		return True
	if a == 1 or a == 3:
		return False
	if a % 2 == 0:
		return poss(3 * (a / 2), b)
	else:
		return poss(a - 1, b)
n = int(input())
for _ in range(n):
	(a, b) = [int(i) for i in input().split(' ')]
	res = 'YES' if poss(a, b) else 'NO'
	print(res)


from math import floor, ceil
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	if a == 3 and b in {2, 1, 3} or (a == 2 and b in {1, 2, 3}) or a >= b or (a >= 4):
		print('Yes')
	else:
		print('No')


t = int(input())
lst = list()
for l in range(t):
	(a, b) = input().split()
	if int(a) >= int(b) or int(a) > 3 or (a == '2' and b == '3'):
		lst.append('YES')
	else:
		lst.append('NO')
for i in lst:
	print(i)


import math

def power(x, y):
	if y == 0:
		return 1
	temp = power(x, int(y / 2))
	if y % 2 == 0:
		return temp * temp
	elif y > 0:
		return x * temp * temp
	else:
		return temp * temp / x
for i in range(int(input())):
	(x, y) = map(int, input().split())
	if x == 1:
		if y == 1:
			print('yes')
		else:
			print('no')
	elif x == 2 or x == 3:
		if y <= 3:
			print('yes')
		else:
			print('no')
	elif x >= 4:
		print('yes')


seen = set()

def solve(x, y):
	if x >= y:
		return True
	if x in seen:
		return False
	seen.add(x)
	result = False
	if x % 2 == 0:
		result = result or solve(3 * x / 2, y)
	if x > 1:
		result = result or solve(x - 1, y)
	return result
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	seen = set()
	print('YES' if solve(x, y) else 'NO')


from sys import stdin
input = stdin.readline
for i in range(int(input())):
	(x, y) = map(int, input().split())
	res = 0
	d = {x: 1}
	while x != 1 and x < y:
		if x & 1 == 0:
			x = x * 3 // 2
			if d.get(x, -1) != -1:
				res = 1
				break
			d[x] = 1
		else:
			x -= 1
			if d.get(x, -1) != -1:
				res = 1
				break
			d[x] = 1
	if x == 1 and y != 1:
		res = 1
	print('YNEOS'[res::2])


def volsh(x, y):
	if x == y:
		return 'yes'
	while y > x and x > 1 and (x != 3):
		if 3 * x % 2 == 0:
			x = 3 * x // 2
		else:
			x -= 1
	if y <= x:
		return 'yes'
	return 'no'
R = []
T = int(input())
for i in range(T):
	A = list(input().split())
	A = [int(item) for item in A]
	x = A[0]
	y = A[1]
	R.append(volsh(x, y))
for k in R:
	print(k)


t = int(input())
for i in range(t):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	prev = 0
	if x >= y:
		print('YES')
	else:
		while 1:
			if x == 1 or prev == x:
				print('NO')
				break
			if x >= y and x > 1:
				print('YES')
				break
			if x % 2 != 0:
				prev = x
				x = x - 1
			if x == 1:
				print('NO')
				break
			x = 3 * x / 2


for _ in range(int(input())):
	(x, y) = list(map(int, input().split()))
	if x >= y or x == 1:
		print('YNEOS'[x < y::2])
	elif x < 4:
		print('YNEOS'[y > 3::2])
	else:
		print('YES')


D = {}
D[1] = 1
D[2] = 3
D[3] = 3
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	if a in D.keys():
		if D[a] < b:
			print('NO')
		else:
			print('YES')
	else:
		print('YES')


q = int(input())
while q:
	(a, b) = [int(x) for x in input().split()]
	if a <= 3:
		if a >= b:
			print('YES')
			q -= 1
			continue
		if a % 2 == 0:
			if a * 3 // 2 == b:
				print('YES')
				q -= 1
				continue
			else:
				print('NO')
				q -= 1
				continue
		print('NO')
	else:
		print('YES')
	q -= 1


import sys
raw_data = sys.stdin.readlines()
testcases = raw_data.pop(0)
for case in raw_data:
	current = case.split()
	x = int(current[0])
	y = int(current[1])
	if x >= y or x > 3:
		print('Yes')
	elif x == 2 and y == 3:
		print('Yes')
	elif x == 3:
		print('No')
	elif x == 1:
		print('No')
	elif x == 2:
		print('No')


def f(l):
	(x, y) = l
	if x > 3:
		return True
	return y < 4 if x > 1 else y < 2
t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	print('YES' if f(l) else 'NO')


n = int(input())
for i in range(n):
	arr = list(map(int, input().split()))
	if arr[0] >= arr[1] or arr[0] > 3:
		print('yes')
	elif arr[0] == 2 and arr[1] == 3:
		print('yes')
	else:
		print('no')


t = int(input())
for i in range(0, t):
	m = input()
	(a, b) = [int(xx) for xx in m.split()]
	if a >= 4:
		print('YES')
	if a == 3 or a == 2:
		if b > 3:
			print('NO')
		else:
			print('YES')
	if a == 1:
		if b == 1:
			print('YES')
		else:
			print('NO')


from collections import defaultdict as dc
import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x >= y:
		print('YES')
	elif x == 1:
		print('NO')
	elif x % 2 == 0:
		if x <= 2:
			if y == 3:
				print('YES')
			else:
				print('NO')
		else:
			print('YES')
	elif x % 2 == 1:
		if x <= 3:
			print('NO')
		else:
			print('YES')


def solve(a, b):
	if a == 1:
		if b == 1:
			return 'YES'
		else:
			return 'NO'
	if a == 2:
		if b < 4:
			return 'YES'
		else:
			return 'NO'
	if a == 3:
		if b < 4:
			return 'YES'
		else:
			return 'NO'
	return 'YES'
t = int(input())
for _ in range(t):
	(a, b) = map(int, input().strip().split())
	print(solve(a, b))


casos = int(input())
for i in range(casos):
	(nInicial, nFinal) = [int(x) for x in input().split()]
	if nInicial >= nFinal:
		print('YES')
		continue
	if nInicial <= 3:
		if nInicial == 2 and nFinal == 3:
			print('YES')
			continue
		print('NO')
		continue
	else:
		print('YES')


queries = int(input())
for x in range(queries):
	nums = input().split()
	nums = (int(x) for x in nums)
	(x, y) = nums
	if x == 2 and y == 3:
		print('YES')
	elif x < y and x <= 3:
		print('NO')
		continue
	else:
		print('YES')
		continue


def main():
	t = int(input())
	for i in range(t):
		(a, b) = list(map(int, input().split(' ')))
		a1 = a
		bo = False
		while True:
			if bo:
				if a == a1 or a <= 1:
					print('NO')
					break
			bo = True
			if b <= a:
				print('YES')
				break
			elif a % 2 == 0:
				a = 3 * a / 2
			else:
				a -= 1
main()


from sys import stdin

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

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

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

def intsput():
	return map(int, sinput())
t = intput()
for _ in range(t):
	(x, y) = intsput()
	if x == 3:
		if y in [1, 2, 3]:
			print('YES')
		else:
			print('NO')
	elif x == 2:
		if y in [1, 2, 3]:
			print('YES')
		else:
			print('NO')
	elif x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(x, y) = list(map(int, input().split()))
	if x == 1:
		if y == 1:
			print('Yes')
		else:
			print('No')
	elif x == 2 or x == 3:
		if y in [1, 2, 3]:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	var = [int(x) for x in input().split(' ')]
	x = var[0]
	y = var[1]
	if x == 1 and y > 1:
		print('NO')
	elif x <= 3 and y > 3:
		print('NO')
	else:
		print('YES')


def count_possibility(inputs):
	(x, y) = inputs
	if x >= y:
		return 'yes'
	if x >= 4:
		if x % 2 == 0:
			res = x * 1.5
		else:
			res = (x - 1) * 1.5
		return count_possibility([res, y])
	if x == 2 and y == 3:
		return 'yes'
	else:
		return 'no'
N = int(input())
for _ in range(N):
	print(count_possibility(list(map(lambda x: int(x), input().split()))))


t = int(input())
while t != 0:
	(x, y) = map(int, input().split(' '))
	if x in [2, 3] and y >= 4 or (x == 1 and y > x):
		print('NO')
	else:
		print('YES')
	t -= 1


from sys import stdin
test = int(stdin.readline())
for i in range(test):
	(a, b) = map(int, stdin.readline().split(' '))
	if a == 1 and b == 1:
		print('YES')
		continue
	if a >= b and a != 1:
		print('YES')
		continue
	elif a % 2 == 0:
		if a * 1.5 - 1 > a or a * 1.5 == b:
			print('YES')
			continue
	elif a % 2 == 1:
		if (a - 1) * 1.5 > a:
			print('YES')
			continue
	print('NO')


def ab():
	(x, y) = map(int, input().split(' '))
	r = []
	if x == y:
		print('YES')
		return
	while x != y:
		if x < y and x > 0:
			if x % 2 == 0:
				x = int(x * 3 / 2)
				if x in r:
					print('NO')
					return
				else:
					r.append(x)
			else:
				x = x - 1
		elif x > y:
			print('YES')
			return
		else:
			print('NO')
			return
	print('YES')
a = int(input())
for i in range(0, a):
	ab()


def solve(start, end):
	if start >= end:
		return 'Yes'
	if start > 3 or (start == 2 and end == 3):
		return 'Yes'
	return 'No'
test = int(input().strip())
for i in range(test):
	(start, end) = map(int, input().strip().split())
	print(solve(start, end))


t = int(input())
for ti in range(t):
	(s, d) = (int(i) for i in input().split(' '))
	if s >= d:
		print('YES')
	elif s <= 3 and d >= 4:
		print('NO')
	elif d == 3 and s == 1:
		print('NO')
	elif d == 2 and s == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(x, y) = list(map(int, input().split()))
	if x >= y:
		print('YES')
	elif x >= 4:
		print('YES')
	else:
		if x % 2 == 1:
			x -= 1
		if x >= 2 and x % 4 == 0:
			print('YES')
		elif x >= 2 and y <= x * 1.5:
			print('YES')
		else:
			print('NO')


a = input()
content = []
for i in range(int(a)):
	b = input()
	content.append(b.split())
for i in range(int(a)):
	for j in range(2):
		content[i][j] = int(content[i][j])
for i in range(int(a)):
	if content[i][0] == 1 and content[i][1] != 1 or (content[i][0] == 2 and content[i][1] > 3) or (content[i][0] == 3 and content[i][1] > 3):
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(a, b) = [int(s) for s in input().split()]
	if a >= b:
		print('YES')
		continue
	if a >= 4:
		print('YES')
	elif a == 2 and b == 3:
		print('YES')
	else:
		print('NO')


def main():
	for t in range(int(input())):
		(n, m) = map(int, input().split())
		if n >= m:
			print('YES')
			continue
		elif n == 1 and m > 1:
			print('NO')
		elif n <= 3 and m > 3:
			print('NO')
		else:
			print('YES')
main()


x = int(input())
for __ in range(x):
	(a, b) = map(int, input().split())
	if a >= b:
		print('YES')
	elif a == 1 or (a == 2 and b != 3) or a == 3:
		print('NO')
	else:
		print('YES')


nr = int(input())
for x in range(nr):
	(a, b) = input().split(' ')
	a = int(a)
	b = int(b)
	if a >= b:
		print('yes', end='\n')
	elif a == 2 and b == 3:
		print('yes', end='\n')
	elif a == 1 or a == 2 or a == 3:
		print('no', end='\n')
	else:
		print('yes', end='\n')


T = int(input())
d = {}
d[1] = set([1])
d[2] = set([1, 2, 3])
d[3] = set([1, 2, 3])
for i in range(T):
	(x, y) = map(int, input().strip().split())
	if x == 1 or x == 2 or x == 3:
		if y in d[x]:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


import math
t = int(input())
for i in range(t):
	n = list(map(int, input().split()))
	if n[1] <= n[0]:
		print('YES')
	elif n[0] == 1:
		if n[1] <= 1:
			print('YES')
		else:
			print('NO')
	elif n[0] <= 3:
		if n[1] <= 3:
			print('YES')
		else:
			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):
		(x, y) = LI()
		m = set()

		def f(x):
			if x >= y:
				return True
			if x in m:
				return False
			m.add(x)
			if x % 2 == 0:
				return f(x // 2 * 3)
			return f(x - 1)
		rr.append(IF(f(x), 'YES', 'NO'))
	return JA(rr, '\n')
print(main())


def main():
	(x, y) = get_list()
	if x >= y or (2 <= x <= 3 and y <= 3) or x > 3:
		print('YES')
	else:
		print('NO')
import sys
out = []
get_int = lambda : int(input())
get_list = lambda : list(map(int, input().split()))
[main() for _ in range(int(input()))]
print(*out, sep='\n')


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

def si():
	return input()

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

def li():
	return list(mi())
mod = 1000000007
t = ii()
while t:
	t -= 1
	(x, y) = mi()
	x1 = x
	if x >= y:
		print('YES')
	elif x == 1:
		print('NO')
	else:
		while 1:
			if x1 % 2 == 0:
				x1 = 3 * (x1 // 2)
			else:
				x1 -= 1
			if y <= x1:
				print('YES')
				break
			if x1 == x:
				print('NO')
				break


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	if x >= y:
		print('yes')
	else:
		while x < y:
			if x <= 1:
				print('no')
				break
			if x % 2 == 0:
				x = 3 * x / 2
			else:
				if x == 3:
					print('no')
					break
				x -= 1
			if x % 1 != 0:
				print('no')
				break
		else:
			print('yes')


T = int(input())
for i in range(T):
	(curr, pred) = map(int, input().split())
	res = 'NO'
	if curr == 0:
		res = 'NO'
	if curr >= pred:
		res = 'YES'
	else:
		c = 0
		temp = curr
		while curr > 0:
			if curr == 0:
				res = 'NO'
				break
			c = c + 1
			if curr == pred:
				res = 'YES'
				break
			curr
			if c > 4:
				if curr == temp:
					res = 'NO'
					break
			if curr % 2 == 0:
				curr = curr * (3 / 2)
			else:
				curr = curr - 1
			if curr >= pred:
				res = 'YES'
				break
	print(res)


i = int(input(''))
a = [0] * i
for j in range(i):
	(x, y) = [int(x) for x in input('').split()]
	if x > 3:
		a[j] = 'yes'
	elif x >= y:
		a[j] = 'yes'
	elif x == 2 and y == 3:
		a[j] = 'yes'
	else:
		a[j] = 'no'
for k in range(i):
	print(a[k])


n = int(input())
for i in range(n):
	(a, b) = [int(x) for x in input().split()]
	if b <= a:
		print('YES')
	else:
		if a % 2 != 0:
			a -= 1
		if 3 * a // 2 == b:
			print('YES')
		elif 3 * a // 2 - 1 == a or a == 0:
			print('NO')
		else:
			print('YES')


import sys, itertools
tc = int(sys.stdin.readline())
for _ in range(tc):
	(a, b) = map(int, sys.stdin.readline().split())
	if a == 1:
		if b == 1:
			print('YES')
		else:
			print('NO')
	elif a == 2 or a == 3:
		if b == 1 or b == 2 or b == 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


import math
import sys
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
t = int(input())
for i in range(t):
	(x, y) = [int(item) for item in input().split()]
	if x == 1:
		if y <= 1:
			print('Yes')
		else:
			print('No')
	elif x == 2 or x == 3:
		if y <= 3:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


n = int(input())
res = []
for i in range(n):
	res += [input().split()]
for i in range(n):
	(a, b) = (int(res[i][0]), int(res[i][1]))
	if a == 1:
		if b != 1:
			print('NO')
		else:
			print('YES')
	elif a == 2:
		if b > 3:
			print('NO')
		else:
			print('YES')
	elif a == 3:
		if b > 3:
			print('NO')
		else:
			print('YES')
	elif a >= 4:
		print('YES')


for t in range(int(input())):
	(x, y) = map(int, input().split())
	ans = False
	if x == 1 and y == 1:
		ans = True
	elif x == 2 and y < 4:
		ans = True
	elif x == 3 and y < 4:
		ans = True
	elif x > 3:
		ans = True
	if ans:
		print('YES')
	else:
		print('NO')


import sys

def readline_single(dtype):
	return dtype(sys.stdin.readline().rstrip())

def readline_multiple(dtype):
	return map(dtype, sys.stdin.readline().split())

def readline_list(dtype):
	return list(map(dtype, sys.stdin.readline().split()))

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

def print_list(lst):
	print(' '.join((str(item) for item in lst)))

def print_list_of_list(lists):
	for lst in lists:
		print_list(lst)

def solve(x, y):
	if x >= y:
		return True
	if x <= 3:
		if x == 2 and y == 3:
			return True
		return False
	return True

def main():
	T = readline_single(int)
	for _ in range(T):
		(x, y) = readline_multiple(int)
		if solve(x, y):
			print('YES')
		else:
			print('NO')
main()


def magic(a, b):
	if a == 2 and b == 3:
		return 'YES'
	elif a <= 3 and a < b:
		return 'NO'
	return 'YES'
t = int(input())
for i in range(t):
	seq = input()
	arr = [int(x) for x in seq.split()]
	print(magic(arr[0], arr[1]))


T = int(input())
for t in range(T):
	(x, y) = input().split()
	(x, y) = (int(x), int(y))
	if (x == 1 or x == 3) and y > x:
		print('NO')
	elif x == 2 and y > 3:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	vis = set()
	if x == 1:
		print('YES' if y == 1 else 'NO')
	elif x == 2 or x == 3:
		print('YES' if y < 4 else 'NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if x == 1:
		can = y == 1
	elif x > 1 and x < 4:
		can = y < 4
	else:
		can = True
	print('YES' if can else 'NO')


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
for _ in range(get_int()):
	(n, m) = get_int_list()
	if n == 1:
		if m == 1:
			print('YES')
		else:
			print('NO')
	elif n == 2:
		if m == 1 or m == 2 or m == 3:
			print('YES')
		else:
			print('NO')
	elif n == 3:
		if m == 1 or m == 2 or m == 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


import sys
Input = sys.stdin.readline
for i in range(int(input())):
	(x, y) = map(int, Input().split())
	if x >= y or x > 3 or (x > 1 and y < 4):
		print('YES')
	else:
		print('NO')


def series(n):
	blanck = [n]
	i = 0
	while i < 100 and n > 1:
		if n % 2 == 0:
			n = 3 * n // 2
			blanck.append(n)
		else:
			n -= 1
			blanck.append(n)
		i += 1
	return max(blanck)

def magic(x, y):
	if y < x:
		return 'YES'
	if x == y:
		return 'YES'
	if x == 1:
		return 'NO'
	blanck = series(x)
	if blanck >= y:
		return 'YES'
	else:
		return 'NO'
for i in range(int(input())):
	(a, b) = map(int, input().strip().split())
	print(magic(a, b))


test = int(input())
for i in range(test):
	t = [int(x) for x in input().split()]
	if t[1] < t[0] and t[0] >= 1 or t[1] == t[0]:
		print('YES')
	else:
		a = t[0]
		while t[1] > t[0] and t[1] * t[0] != 0:
			flag = 1
			if not t[0] % 2:
				t[0] *= 3 / 2
				flag = 0
			elif t[0] >= 1 and flag:
				t[0] -= 1
			if a == t[0]:
				break
		if t[0] >= t[1]:
			print('YES')
		else:
			print('NO')


cases = int(input())
for _ in range(cases):
	(a, b) = map(int, input().split())
	if b <= a:
		print('YES')
	elif a >= 4:
		print('YES')
	elif a == 3 or a == 2:
		if b <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a >= b:
		print('YES')
	else:
		f = a
		x = 0
		while f // 2 > 0:
			x += 1
			f = f // 2
		if x > 1 or (x == 1 and b == 3):
			print('YES')
		else:
			print('NO')


def possible(x, y):
	if x >= 4:
		return True
	if x == 3:
		return y <= 3
	if x == 2:
		return y <= 3
	if x == 1:
		return y == 1
t = int(input())
for _ in range(t):
	(a, b) = [int(x) for x in input().split()]
	print('YES' if possible(a, b) else 'NO')


t = int(input())
while t:
	t -= 1
	(x, y) = tuple(map(int, input().split()))
	if x >= y:
		print('YES')
		continue
	elif x == 1:
		print('NO')
		continue
	count = 0
	flag = 0
	while count < 100:
		if x >= y:
			flag = 1
			break
		if x % 2:
			x -= 1
		else:
			x = 3 * x // 2
		count += 1
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for tt in range(t):
	(a, b) = map(int, input().split())
	if b <= a:
		print('YES')
	else:
		if a == 2 and b > 3:
			print('NO')
			continue
		if a == 1 or a == 3:
			print('NO')
		else:
			print('YES')


notreq = int(input())
for ntr in range(notreq):
	(a, b) = map(int, input().split())
	if a >= b:
		print('YES')
	else:
		isposs = False
		if a % 2 != 0 and a > 1:
			a -= 1
		while a % 2 == 0:
			a //= 2
			a *= 3
			if a == 3 and b != 3:
				isposs = False
				break
			if a >= b:
				isposs = True
				break
			if a % 2 != 0 and a > 1:
				a -= 1
		if isposs:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	(x, y) = (int(v) for v in input().split())
	ans = 'yes'
	if x == 1:
		if y > 1:
			ans = 'no'
	elif x <= 3:
		if y > 3:
			ans = 'no'
	print(ans)


count = int(input())
result = []
for _ in range(count):
	(x, y) = list(map(lambda num: int(num), input().split()))
	if x >= y:
		result.append('YES')
	elif x == 1 or x == 2 or x == 3:
		if x == 2 and y == 3:
			result.append('YES')
		else:
			result.append('NO')
	else:
		result.append('YES')
print('\n'.join(result))


def magic_transform(x, y):
	if x >= y or x > 3 or (x > 1 and y < 4):
		return 'YES'
	return 'NO'
q = int(input())
for i in range(q):
	(x, y) = map(int, input().split())
	print(magic_transform(x, y))


def run_testcase():
	[x, y] = [int(x) for x in input().split()]
	if x == 1:
		return 'YES' if x == y else 'NO'
	if x == 2 or x == 3:
		return 'YES' if y in {1, 2, 3} else 'NO'
	if y <= x:
		return 'YES'
	return 'YES'
testcase_count = int(input())
for i in range(testcase_count):
	print(str(run_testcase()))


import sys
data = [[int(x) for x in y.split()] for y in sys.stdin.readlines()[1:]]
for (a, b) in data:
	if b <= a:
		print('YES')
	elif a <= 3 and (not (a == 2 and b == 3)):
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	(x, y) = map(int, input().split())
	g = False
	if x >= y:
		g = True
	elif x <= 1:
		g = False
	elif x > 3 or y <= 3:
		g = True
	else:
		g = False
	print('YNEOS'[not g::2])


t = int(input())
while t > 0:
	(a, b) = [int(i) for i in input().split()]
	if a == 1 and b != 1:
		print('NO')
	elif a == 2 and b > 3:
		print('NO')
	elif a == 3 and b > 3:
		print('NO')
	else:
		print('YES')
	t -= 1


for _ in range(int(input())):
	(a, b) = [int(_) for _ in input().split()]
	if a == 1 and a != b or (a == 3 and b > a) or (a == 2 and b not in (3, 2, 1)):
		print('No')
	else:
		print('Yes')


def check(x, y):
	if x > y or x == y or (x % 2 == 0 and 3 * x // 2 == y):
		return True
	if x == 1 and x < y:
		return False
	elif x % 2 == 1 and 3 * x - 3 == 2 * x:
		return False
	elif x % 2 == 0 and (3 * x // 2 == x or 3 * x // 2 == x + 1) and (3 * x // 2 != y):
		return False
	return True
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if check(x, y):
		print('YES')
	else:
		print('NO')


N = int(input())
while N != 0:
	N -= 1
	(x, y) = map(int, input().split())
	if x == 1 and y == 1:
		print('YES')
		continue
	elif x == 1:
		print('NO')
		continue
	if x == 2 or x == 3:
		if y <= 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


qq = int(input())
h = []

def ps(a):
	a = a * 3
	a = int(a / 2)
	return a

def vs(a):
	a = a - 1
	return a
for i in range(0, qq):
	o = 0
	(x, y) = map(int, input().split())
	if x > y:
		o = 1
	if x == y:
		o = 1
	if x >= 4:
		o = 1
	if x == 3 and y <= 2:
		o = 1
	if x == 1 and y == 0:
		o = 1
	if x == 2 and y <= 3:
		o = 1
	h.append(o)
for i in range(0, qq):
	if h[i] == 1:
		print('YES')
	else:
		print('NO')


n = int(input())
for k in range(n):
	(a, b) = map(int, input().split())
	if a >= b:
		print('YES')
	elif a == 2 or a == 3:
		if b == 3:
			print('YES')
		else:
			print('NO')
	elif a == 1:
		print('NO')
	else:
		print('YES')


def fun(ans, x, y):
	if x in ans and x < y:
		print('NO')
	else:
		ans.append(x)
		if x >= y:
			print('YES')
		elif x % 2 == 0:
			x = 3 * x // 2
			fun(ans, x, y)
		else:
			x -= 1
			fun(ans, x, y)
t = int(input())
for a0 in range(t):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if x >= y:
		print('YES')
	elif x == 1 and y > x:
		print('NO')
	else:
		ans = []
		fun(ans, x, y)


n = int(input())
for p in range(n):
	c = input().split()
	(a, b) = (int(c[0]), int(c[1]))
	if b == 1:
		print('YES')
	elif a == 3 or a == 2:
		if b == 3 or b == 2:
			print('YES')
		else:
			print('NO')
	elif a == 1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split(' '))
	if x >= y:
		print('YES')
	elif x == 1:
		print('NO')
	else:
		q = x
		if x % 2 == 0:
			x = int(x / 2) * 3
			if x == y:
				print('YES')
			elif x % 2 == 0 and x > q:
				print('YES')
			elif x % 2 != 0 and x - 1 > q:
				print('YES')
			else:
				print('NO')
		else:
			x = x - 1
			x = int(x / 2) * 3
			if x == y:
				print('YES')
			elif x % 2 == 0 and x > q:
				print('YES')
			elif x % 2 != 0 and x - 1 > q:
				print('YES')
			else:
				print('NO')


n = int(input())
for _ in range(n):
	(a, b) = map(int, input().split())
	Flag = True
	k = a
	t = 0
	while Flag and k < b:
		if k % 2 == 0:
			k = k * 3 / 2
		elif k % 2 == 1:
			k -= 1
		if k == a or k == 0:
			Flag = False
	if Flag:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(p, q) = map(int, input().split())
	if q <= p:
		print('YES')
	elif p == 3 or p == 1:
		print('NO')
	elif p == 2 and q != 3:
		print('NO')
	else:
		print('YES')


t = int(input())
for case in range(t):
	(x, y) = [int(s) for s in input().split(' ')]
	if x == 1 and y > 1:
		ans = 'NO'
	elif x <= 3 and y > 3:
		ans = 'NO'
	else:
		ans = 'YES'
	print(ans)


for i in range(int(input())):
	(x, y) = [int(z) for z in input().split()]
	if x == y:
		print('yes')
	elif x < 4 and y >= 4:
		print('no')
	elif x < 4 and y < 4:
		if x == 1:
			print('no')
		else:
			print('yes')
	else:
		print('yes')


n = int(input())
for i in range(n):
	(a, b) = [int(x) for x in input().split()]
	if a <= 3 and b > 3:
		print('no')
	elif a == 1 and b != 1:
		print('no')
	else:
		print('yes')


import math
import bisect
from collections import defaultdict as df
from collections import deque
from sys import stdin, stdout
t = int(input())
for i in range(t):
	(x, y) = list(map(int, input().split()))
	if x >= y:
		print('YES')
	elif x == 1:
		print('NO')
	elif x == 2 and y == 3:
		print('YES')
	elif x == 2 and y != 3:
		print('NO')
	elif x == 3 and y > x:
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	can = True
	t -= 1
	(x, y) = map(int, input().split())
	if x == 1 and y > 1:
		can = False
	elif x == 2 and y > 3:
		can = False
	elif x == 3 and y > 3:
		can = False
	print('YES' if can else 'NO')


def can_get():
	(x, y) = [int(parsed) for parsed in input().split(' ')]
	if y == x or y < x:
		return 'YES'
	elif x > 3:
		return 'YES'
	else:
		return 'YES' if x == 2 and y == 3 else 'NO'
T = int(input())
for i in range(0, T):
	print(can_get())


import math
t = int(input())

def hello():
	(x, y) = map(int, input().split())
	if x == 1 and y != 1:
		return 'NO'
	if (x == 2 or x == 3) and y > 3:
		return 'NO'
	else:
		return 'YES'
for i in range(t):
	print(hello())


from collections import defaultdict

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

def inp():
	return list(inp1())

def num():
	return int(input())
for _ in range(num()):
	(x, y) = inp1()
	if x > 3:
		print('YES')
	elif y <= x:
		print('YES')
	elif y == 3 and x == 2:
		print('YES')
	else:
		print('NO')


t = int(input())
res = []
for _ in range(t):
	[x, y] = list(map(int, input().strip().split()))
	if x == y or (x >= 2 and y <= 3) or x >= 4:
		res.append('YES')
	else:
		res.append('NO')
for ans in res:
	print(ans, end='\n')


def magic_tricks():
	cases = int(input())
	numbers = []
	for i in range(cases):
		numbers.append(input().split())
	for i in range(len(numbers)):
		if int(numbers[i][0]) >= int(numbers[i][1]):
			print('YES')
		elif int(numbers[i][0]) == 2 and int(numbers[i][1]) == 3:
			print('YES')
		elif int(numbers[i][0]) < 4 and int(numbers[i][0]) < int(numbers[i][1]):
			print('NO')
		else:
			print('YES')
magic_tricks()


t = int(input())
for gg in range(t):
	(x, y) = map(int, input().split())
	if x == 1 and y != 1:
		print('no')
	elif x >= y:
		print('yes')
	elif x >= 4:
		print('yes')
	elif y < 4:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x == y:
		print('YES')
	elif x == 1 and y != 1:
		print('NO')
	elif any((x == z for z in [1, 2, 3])) and all((y != z for z in [1, 2, 3])):
		print('NO')
	else:
		print('YES')


t = int(input())
o = []
for i in range(t):
	(x, y) = map(int, input().split())
	if x == 1 and y == 1:
		o.append('YES')
	elif x == 2 and y < 4:
		o.append('YES')
	elif x == 3 and y < 4:
		o.append('YES')
	elif x > 3:
		o.append('YES')
	else:
		o.append('NO')
for x in o:
	print(x)


t = int(input())
for i in range(t):
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	l = [1, 3]
	if a in l and b > a or (a == 2 and b > 3):
		print('NO')
	else:
		print('YES')


t = int(input())

def solution(x, y):
	if x == y:
		return 'YES'
	elif x == 1 and y != 1:
		return 'NO'
	elif x > y and x % 2 == 0 and (x > 1):
		return 'YES'
	elif x > 3:
		return 'YES'
	elif x == 2 or x == 3:
		if y not in [1, 2, 3]:
			return 'NO'
		else:
			return 'YES'
for _ in range(t):
	(x, y) = list(map(int, input().split()))
	print(solution(x, y))


def first(x):
	return 1.5 * x

def second(x):
	return x - 1
t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if x == y:
		print('YES')
		continue
	elif x <= 1 and y > x:
		print('NO')
		continue
	elif x == 2 and y > 3:
		print('NO')
		continue
	elif x == 3 and y > 3:
		print('NO')
		continue
	else:
		print('YES')
		continue


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	c = x
	if x == 1:
		if y == 1:
			print('YES')
		else:
			print('NO')
	else:
		while not x >= y:
			if x % 2 != 0:
				x -= 1
			else:
				x *= 3 / 2
			if x == c:
				print('NO')
				break
		if x >= y:
			print('YES')


def solve(x, y, prev):
	if x >= y:
		return print('YES')
	elif x % 2 == 0:
		p = x // 2 * 3
		if prev >= p:
			return print('NO')
		else:
			return solve(p, y, x)
	else:
		solve(x - 1, y, x)

def main():
	T = int(input())
	para = [0 for i in range(T)]
	for i in range(T):
		(x, y) = map(int, input().split())
		para[i] = [x, y]
	for i in range(T):
		solve(para[i][0], para[i][1], para[i][0])
main()


def Y(f):
	if f:
		print('YES')
	else:
		print('NO')
n = int(input())
for _ in range(n):
	(a, b) = map(int, input().split())
	if a == 1:
		Y(b == 1)
	elif a <= 3:
		Y(b <= 3)
	else:
		Y(1)


ans = []
for i in range(int(input())):
	(x, y) = map(int, input().split())
	if x >= y:
		ans.append('YES')
	elif x == 1 and y != 1 or (x == 3 and y != 1) or (x == 2 and y != 3):
		ans.append('NO')
	else:
		ans.append('YES')
for i in ans:
	print(i)


def trick(x, y):
	if x >= y:
		return 'YES'
	elif x % 2 == 0:
		x *= 1.5
		return trick(x, y)
	elif x > 1 and x != 3:
		x -= 1
		return trick(x, y)
	else:
		return 'NO'
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	print(trick(x, y))


import sys

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

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

def mints():
	return map(int, minp().split())
a = [0] * 4
a[1] = [1]
a[2] = [2, 3, 1]
a[3] = [2, 3, 1]

def solve():
	(x, y) = mints()
	if x >= 4:
		print('YES')
	elif y in a[x]:
		print('YES')
	else:
		print('NO')
for i in range(mint()):
	solve()


am = int(input())
for _ in range(am):
	strIn = list(map(int, input().split()))
	(x, y) = (strIn[0], strIn[1])
	if x < y and x == 3 or (x < y and x == 1) or (x == 2 and (not y == 3) and (not x >= y)):
		print('NO')
	else:
		print('YES')


def printout(x):
	if x:
		print('Yes')
	else:
		print('No')
t = int(input())
for i in range(0, t):
	(x, y) = list(map(int, input().split()))
	if x == 1:
		printout(y == 1)
	elif (x == 2) | (x == 3):
		printout(y <= 3)
	else:
		printout(True)


import sys, atexit
from io import BytesIO
inp = BytesIO(sys.stdin.buffer.read())
input = lambda : inp.readline().decode('ascii')
buf = BytesIO()
atexit.register(lambda : sys.__stdout__.buffer.write(buf.getvalue()))
for i in range(int(input())):
	(x, y) = map(int, input().split())
	s = set()
	n3 = 0
	n2 = 0
	if x >= y:
		print('YES')
		continue
	x &= ~1
	s = set()
	while x % 2 == 0 and x < y and (x not in s):
		s.add(x)
		x //= 2
		x *= 3
		if x % 2 == 1 and x < y:
			x -= 1
	if x >= y:
		print('YES')
	else:
		print('NO')


T = int(input())
for i in range(T):
	(x, y) = list(map(int, input().split()))
	if x > 3:
		print('YES')
	elif x == y:
		print('YES')
	elif x == 1 and y > 1:
		print('NO')
	elif x == 0 and y != 0:
		print('NO')
	elif x == 2 and y > 3:
		print('NO')
	elif x == 3 and y > 3:
		print('NO')
	else:
		print('YES')


for tc in range(int(input())):
	(n, m) = list(map(int, input().split()))
	res = 'NO'
	if n >= 4:
		res = 'YES'
	if n == 3 and m <= 3:
		res = 'YES'
	if n == 2 and m <= 3:
		res = 'YES'
	if n == 1 and m == 1:
		res = 'YES'
	print(res)