Adilbek was assigned to a special project. For Adilbek it means that he has $n$ days to run a special program and provide its results. But there is a problem: the program needs to run for $d$ days to calculate the results.

Fortunately, Adilbek can optimize the program. If he spends $x$ ($x$ is a non-negative integer) days optimizing the program, he will make the program run in $\left\lceil \frac{d}{x + 1} \right\rceil$ days ($\left\lceil a \right\rceil$ is the ceiling function: $\left\lceil 2.4 \right\rceil = 3$, $\left\lceil 2 \right\rceil = 2$). The program cannot be run and optimized simultaneously, so the total number of days he will spend is equal to $x + \left\lceil \frac{d}{x + 1} \right\rceil$.

Will Adilbek be able to provide the generated results in no more than $n$ days?


-----Input-----

The first line contains a single integer $T$ ($1 \le T \le 50$) — the number of test cases.

The next $T$ lines contain test cases – one per line. Each line contains two integers $n$ and $d$ ($1 \le n \le 10^9$, $1 \le d \le 10^9$) — the number of days before the deadline and the number of days the program runs.


-----Output-----

Print $T$ answers — one per test case. For each test case print YES (case insensitive) if Adilbek can fit in $n$ days or NO (case insensitive) otherwise.


-----Example-----
Input
3
1 1
4 5
5 11

Output
YES
YES
NO



-----Note-----

In the first test case, Adilbek decides not to optimize the program at all, since $d \le n$.

In the second test case, Adilbek can spend $1$ day optimizing the program and it will run $\left\lceil \frac{5}{2} \right\rceil = 3$ days. In total, he will spend $4$ days and will fit in the limit.

In the third test case, it's impossible to fit in the limit. For example, if Adilbek will optimize the program $2$ days, it'll still work $\left\lceil \frac{11}{2+1} \right\rceil = 4$ days.

Source: codeforces | Difficulty: EASY
Tags: Sorting

Mathematics

Complete search


Solutions:
import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		f = 0
		for i in range(1, n + 1):
			if i + math.ceil(d / (i + 1)) <= n:
				f = 1
				break
		if f == 1:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	(n, d) = map(int, input().split())
	print('NO') if (1 - n) ** 2 - 4 * (d - n) < 0 else print('YES')


import math

def check(n, d):
	ms = math.sqrt(d)
	f = math.floor(ms)
	c = math.ceil(ms)
	if math.ceil(f + d / f - 1) <= n or math.ceil(c + d / c - 1) <= n:
		return 1
	return 0
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n or check(n, d):
		print('YES')
	else:
		print('NO')


from math import ceil
T = int(input())

def f(x):
	return x ** 2 + x

def opt(n, d):
	xL = 0
	xR = n
	while xL < xR:
		xMid = (xL + xR + 1) // 2
		if f(xMid) > d:
			xR = xMid - 1
		else:
			xL = xMid
	return xL
while T > 0:
	T -= 1
	(n, d) = map(int, input().split())
	x = opt(n, d)
	if x + ceil(d / (x + 1)) <= n:
		print('YES')
	else:
		print('NO')


import math

def main():
	t = int(input())
	for i in range(t):
		arr = input().split(' ')
		(arr[0], arr[1]) = (int(arr[0]), int(arr[1]))
		if arr[0] >= arr[1]:
			print('YES')
		else:
			diff = arr[1] - arr[0]
			flag = 0
			w = []
			for i in range(1, arr[0]):
				if math.ceil(arr[1] / (i + 1)) + i <= arr[0]:
					flag = 1
					break
			if flag == 1:
				print('YES')
			else:
				print('NO')
main()


import math
t = int(input())
for T in range(t):
	(n, d) = map(int, input().split())
	flag = 0
	if n >= d or d <= math.ceil(n / 2) * math.ceil((n + 1) / 2):
		flag = 1
		print('YES')
	else:
		print('NO')


import sys, math, string, bisect
from itertools import *
input = sys.stdin.readline
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().strip()
t = I()
for _ in range(t):
	(n, m) = M()
	i = 1
	f = 1
	if n >= m:
		print('YES')
	else:
		x = int(math.sqrt(m))
		for i in range(max(1, x - 1), min(x + 2, m)):
			if i + math.ceil(m / (i + 1)) <= n:
				print('YES')
				f = 0
				break
		if f:
			print('NO')


from math import ceil
from math import sqrt
t = int(input())
s = {}
for i in range(t):
	(n, d) = map(int, input().split())
	s[i] = [n, d]
for (key, value) in s.items():
	n = int(value[0])
	d = int(value[1])
	if d > n:
		total = ceil(2.0 * sqrt(1.0 * d) - 1)
		if total <= n:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


from sys import stdin
from math import sqrt

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

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

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

def intsput():
	return map(int, sinput())
debugging = False

def dprint(*args):
	if debugging:
		print(*args)
	else:
		pass
t = intput()
for _ in range(t):
	(n, d) = intsput()
	mid = int(sqrt(d) - 1)
	for x in range(mid - 1000, mid + 1000):
		if x >= 0:
			trial = x + (d + x) // (x + 1)
			if trial <= n:
				print('YES')
				break
	else:
		print('NO')


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		a = d ** 0.5
		a = int(a)
		if d % (a + 1) == 0:
			b = d // (a + 1)
		else:
			b = d // (a + 1)
			b += 1
		y = a + b
		if d % a == 0:
			b = d // a
		else:
			b = d // a
			b += 1
		z = a - 1 + b
		if y > z:
			y = z
		if y <= n:
			print('YES')
		else:
			print('NO')


def solve(n, d):
	r1 = (n - 1 + ((1 - n) ** 2 - 4 * (d - n)) ** 0.5) / 2
	r2 = (n - 1 - ((1 - n) ** 2 - 4 * (d - n)) ** 0.5) / 2
	try:
		r1 = int(r1)
		r2 = int(r2)
		return True
	except:
		return False

def solve2(n, d):
	r1 = (n - 2 + ((2 - n) ** 2 - 4 * (d - n)) ** 0.5) / 2
	r2 = (n - 2 - ((2 - n) ** 2 - 4 * (d - n)) ** 0.5) / 2
	try:
		r1 = int(r1)
		r2 = int(r2)
		return True
	except:
		return False
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if solve(n, d) or solve2(n, d):
		print('YES')
	else:
		print('NO')


inp = lambda : map(int, input().split())
for _ in range(int(input())):
	(n, d) = inp()
	print('YNEOS'[4 * d > (n + 1) ** 2::2])


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	x = n // 2
	y = math.ceil(d / (x + 1))
	if x + y <= n:
		print('YES')
	else:
		print('NO')


import math
for i in range(int(input())):
	res = 'NO'
	(n, d) = map(int, input().split())
	for x in range(0, 100000):
		nd = x + math.ceil(d / (x + 1))
		if nd <= n:
			res = 'YES'
	print(res)


from math import ceil

def res(n, d):
	a = 'YES'
	b = 'NO'
	for i in range(1, n):
		if i + ceil(d / (i + 1)) <= n:
			return a
	return b
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if n == 1:
		if d == 1:
			print('YES')
		else:
			print('NO')
	else:
		print(res(n, d))


import math
t = int(input())
while t:
	t += -1
	(n, d) = map(int, input().split())
	i = int(math.sqrt(d))
	t2 = i + math.ceil(d / (i + 1))
	t3 = i - 1 + math.ceil(d / i)
	if t2 <= n or t3 <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	k = 0
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
		continue
	ss = d
	for i in range(int(d ** 0.5 / 2), 100000):
		s = math.ceil(d / (i + 1)) + i
		if s <= n:
			print('YES')
			k = 55
			break
		if s > ss:
			print('NO')
			k = 55
			break
		ss = s


import math as m
x = int(input())
for i in range(x):
	(n, d) = map(int, input().split())
	s = 0
	if d <= n:
		print('YES')
	else:
		i = n - 1
		s = 0
		while i >= 1:
			k = i + m.ceil(d / (i + 1))
			if k <= n:
				print('YES')
				s = 1
				break
			else:
				i = i - (k - n)
		if s == 0:
			print('NO')


def arr_inp():
	return [int(x) for x in stdin.readline().split()]
from sys import stdin
from math import ceil
for i in range(int(input())):
	(n, d) = arr_inp()
	if n == d:
		print('YES')
	else:
		(a, b, c, mi) = (0, d, 2, d)
		while b >= a:
			(b, a) = (ceil(d / c), a + 1)
			mi = min(mi, a + b)
			c += 1
		print('YES' if n >= mi else 'NO')


import math
T = int(input())
for t in range(T):
	(n, d) = map(int, input().split())
	h = n / 2
	poss = [int(h)]
	if h != int(h):
		poss.append(int(h) + 1)
	val = 'NO'
	for x in poss:
		if x + math.ceil(d / (x + 1)) <= n:
			val = 'YES'
	print(val)


from math import sqrt
for w in range(int(input())):
	(n, d) = map(int, input().split())
	print('yes') if 2 * sqrt(d) <= n + 1 else print('no')


import math
T = int(input())
r = []
for t in range(T):
	(n, d) = [int(x) for x in input().split(' ')]
	x = 0
	while math.ceil(d / (x + 1)) > n - x:
		x += 1
		if x >= n:
			break
	if x >= n:
		r.append('NO')
	else:
		r.append('YES')
for i in r:
	print(i)


for i in range(int(input())):
	(n, d) = [int(x) for x in input().split()]
	if 2 * d ** 0.5 - 1 <= n:
		print('YES')
	else:
		print('NO')


import math

def brute(n, d):
	for x in range(10 ** 5):
		val = x + math.ceil(d / (x + 1))
		if val <= n:
			return True
	return False

def main():
	t = int(input())
	for i in range(t):
		(n, d) = map(int, input().split())
		if brute(n, d):
			print('YES')
		else:
			print('NO')
main()


import math
x = int(input())
for i in range(x):
	(a, b) = map(int, input().split())
	t = int(math.sqrt(b))
	r = 0
	for j in range(max(t - 2, 0), t + 2):
		if j + 1 + (b - 1) // (j + 1) <= a:
			print('YES')
			r = 1
			break
	if r == 0:
		print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	else:
		flag = 0
		for i in range(1, n):
			if i + math.ceil(d / (i + 1)) <= n:
				print('YES')
				flag = 1
				break
		if flag == 0:
			print('NO')


from math import ceil
for _ in range(int(input())):
	(n, m) = map(int, input().split())
	flag = False
	for i in range(0, int(m ** 0.5) + 1):
		if i + ceil(m / (i + 1)) <= n:
			flag = True
	if flag == True:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(n, m) = map(int, input().split())
	n = (n - 1) ** 2 - 4 * (m - n)
	if n >= 0:
		print('YES')
	else:
		print('NO')


import math

def solve(deadline, resTime):
	if resTime <= deadline:
		print('YES')
		return
	prev = resTime
	timeAfterx = resTime
	i = 1
	while prev >= timeAfterx:
		prev = timeAfterx
		timeAfterx = i + math.ceil(resTime / (i + 1))
		i = i + 1
	if prev > deadline:
		print('NO')
	else:
		print('YES')
t = int(input())
for i in range(t):
	(deadline, resTime) = map(int, input().split())
	solve(deadline, resTime)


t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		flag = False
		for j in range(n):
			if j + (d + j) // (j + 1) <= n:
				print('YES')
				flag = True
				break
		if not flag:
			print('NO')


import math

def cal_cost(x, d):
	return x + math.ceil(d / (x + 1))
for t in range(int(input())):
	x = list(map(int, input().split()))
	n = x[0]
	d = x[1]
	m = math.ceil(math.sqrt(d))
	r = d + 1
	if d <= n:
		print('YES')
	else:
		for i in range(1, m + 1):
			if r > cal_cost(i, d):
				r = cal_cost(i, d)
		if r <= n:
			print('YES')
		else:
			print('NO')


tests = input()
tests = int(tests)
for p in range(tests):
	a = input().split(' ')
	n = int(a[0])
	d = int(a[1])
	c = False
	if n != d:
		for i in range(1, n):
			r = i + -(-d // (i + 1))
			if r <= n:
				print('YES')
				c = True
				break
		if not c:
			print('NO')
	else:
		print('YES')


for t in range(int(input())):
	(n, d) = map(int, input().split())
	p = n // 2 + d / (n // 2 + 1)
	print(['NO', 'YES'][p <= n])


T = int(input())
for _ in range(T):
	(n, d) = map(int, input().split())
	for i in range(max(0, (n - 1) // 2 - 10), min(n, (n - 1) // 2 + 10)):
		if i + (d + i) // (i + 1) <= n:
			print('YES')
			break
	else:
		print('NO')


import math
n = int(input())
while n:
	n -= 1
	(u, v) = map(int, input().split())
	if v <= u:
		print('YES')
	else:
		p = 1
		for i in range(1, u + 1):
			if math.ceil(v / (i + 1)) <= u - i:
				p = 0
				break
		if p == 0:
			print('YES')
		else:
			print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	rootd = int(math.sqrt(d))
	ans = 'NO'
	for i in range(max(0, rootd - 5), rootd + 5):
		a = i + math.ceil(d / (i + 1))
		if a <= n:
			ans = 'YES'
	print(ans)


import math
t = int(input())
for T in range(t):
	x = input()
	(n, d) = x.split(' ')
	n = int(n)
	d = int(d)
	k = n // 2
	if k + math.ceil(d / (k + 1)) <= n:
		print('YES')
	else:
		print('NO')


import math

def checkans(n, d):
	res = 0
	if d <= n:
		return 'YES'
	for x in range(n + 1):
		res = x + math.ceil(d / (x + 1))
		if res <= n:
			return 'YES'
	return 'NO'
for _ in range(int(input())):
	(n, d) = map(int, input().strip().split())
	print(checkans(n, d))


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
from typing import List

def solve(N, D):
	X = int(math.sqrt(D))
	for x in range(max(0, X - 10), min(N, X + 10) + 1):
		if x + int(math.ceil(D / (x + 1))) <= N:
			return True
	return False
T = int(input())
ans = []
for ti in range(T):
	(N, D) = map(int, input().split())
	ans.append(solve(N, D))
print('\n'.join(['YES' if v else 'NO' for v in ans]))


import math
t = int(input())
answers = []
for ti in range(t):
	ints = list(map(int, input().split()))
	(n, d) = (ints[0], ints[1])
	x = math.ceil(math.sqrt(d) - 1)
	if math.ceil(d / (x + 1)) + x <= n:
		answers.append('YES')
	else:
		answers.append('NO')
for a in answers:
	print(a)


import math as m
t = int(input())
while t:
	(n, d) = map(int, input().split(' '))
	ans = 100000000000
	i = 0
	while i * i <= d:
		if i + m.ceil(d / (i + 1)) < ans:
			ans = i + m.ceil(d / (i + 1))
		i += 1
	print('YES' if ans <= n else 'NO')
	t -= 1


import math
test_cases = int(input())
for _ in range(test_cases):
	(n, d) = map(int, input().split(' '))
	if d <= n:
		print('YES')
	else:
		for trials in range(n):
			if trials + math.ceil(d / (trials + 1)) <= n:
				print('YES')
				break
		else:
			print('NO')


n = int(input())
for i in range(n):
	(n, d) = map(int, input().split())
	f = lambda x: x * x + x * (1 - n) + d - (n + 1)
	print('yes' if f((n - 1) // 2) < 0 or f(n // 2) < 0 else 'no')


import math
t = int(input())
while t > 0:
	(n, d) = map(int, input().split())
	ans = 0
	for x in range(0, 10 ** 5):
		tmp = x + math.ceil(d / (x + 1))
		if tmp <= n:
			ans = 1
	if ans == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


from math import ceil

def func(n, d):
	(l, h) = (2, n)
	while l <= h:
		mid = (l + h) // 2
		x = ceil(d / mid)
		if x + (mid - 1) <= n:
			return True
		elif x > mid - 1:
			l = mid + 1
		else:
			h = mid - 1
	return False
for t in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n or func(n, d):
		print('YES')
	else:
		print('NO')


from math import ceil
test = int(input())
for z in range(test):
	(day, work) = list(map(int, input().split()))
	l = -1
	r = day
	while r - l > 1:
		m = (l + r) // 2
		new_work = ceil(work / (m + 1))
		if new_work + m <= day:
			r = m
		else:
			l = m
	if r + ceil(work / (r + 1)) <= day:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	qq = (-1 + (4 * d) ** 0.5) / 2
	if int(qq) + (d + int(qq)) // (int(qq) + 1) > n and int(qq) + 1 + (d + int(qq) + 1) // (int(qq) + 2) > n:
		print('NO')
		continue
	if qq >= 0:
		print('YES')
	else:
		print('NO')


import math

def main():
	(n, d) = map(int, input().split())
	to_del = int(math.sqrt(d))
	for dl in range(max(1, to_del - 1000), to_del + 1000):
		a = d // (dl + 1)
		b = d % (dl + 1)
		if b:
			a += 1
		if n >= d:
			print('YES')
			return 0
		a += dl
		if a <= n:
			print('YES')
			return 0
		else:
			pass
	print('NO')
t = int(input())
for i in range(t):
	main()


import sys
import math
for t in sys.stdin:
	t = int(t.strip())
	while t:
		line = sys.stdin.readline()
		(n, d) = line.strip().split()
		n = int(n)
		d = int(d)
		if n >= d:
			print('YES')
		else:
			found = False
			for i in range(1, n):
				if math.ceil(d / (1.0 * (i + 1))) + i <= n:
					print('YES')
					found = True
					break
			if not found:
				print('NO')
		t = t - 1


import math
t = int(input())
while t > 0:
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		flag = False
		i = 1
		while i ** 2 <= d:
			if i + math.ceil(d / (i + 1)) <= n:
				flag = True
				break
			i += 1
		if flag:
			print('YES')
		else:
			print('NO')
	t -= 1


def main():
	t = int(input())
	from math import ceil
	for i in range(t):
		(n, d) = map(int, input().split())
		for i in range(d):
			p = i + d / (i + 1)
			if p < i + 1 + d / (i + 2):
				break
		p = ceil(p)
		if p <= n:
			print('YES')
		else:
			print('NO')
main()


T = int(input())
import math
for i in range(T):
	(n, d) = list(map(int, input().split()))
	if n == d:
		print('YES')
	else:
		flag = 0
		for i in range(1, n + 1):
			if i + math.ceil(d / (i + 1)) <= n:
				flag = 1
				break
		if flag == 1:
			print('YES')
		else:
			print('NO')


def main(n, d):
	index = 1
	if d <= n:
		return 'Yes'
	while index <= n:
		if index + d / (index + 1) <= n:
			return 'Yes'
		index = index + 1
	return 'No'
t = int(input())
for t_itr in range(t):
	nd = list(map(int, input().rstrip().split()))
	n = nd[0]
	d = nd[1]
	res = main(n, d)
	print(res)


def func(n, d):
	for i in range(1, n + 1):
		if d % (i + 1) == 0:
			x = i + d // (i + 1)
		else:
			x = i + d // (i + 1) + 1
		if x <= n:
			print('YES')
			return
	print('NO')
k = int(input())
for i in range(k):
	(n, d) = map(int, input().split())
	if d <= n:
		print('yes')
	else:
		func(n, d)


t = int(input())
for i in range(t):
	inp = list(map(int, input().split()))
	n = inp[0]
	d = inp[1]
	if d <= n:
		print('YES')
	else:
		flag = 0
		for k in range(1, n):
			if d % (k + 1) == 0:
				if k + d // (k + 1) <= n:
					flag = 1
					break
			elif k + d // (k + 1) + 1 <= n:
				flag = 1
				break
		if flag == 1:
			print('YES')
		else:
			print('NO')


t = int(input())
for e in range(t):
	(n, d) = list(map(int, input().split()))
	l = 0
	r = n
	a = []
	eps = 1e-06
	while r - l > 1:
		m1 = int(l + (r - l) / 3 - 1e-09)
		m2 = int(l + (r - l) / 3 * 2 - 1e-09)
		if m1 + d / (m1 + 1) > m2 + d / (m2 + 1):
			l = l + (r - l) / 3
		elif m1 + d / (m1 + 1) < m2 + d / (m2 + 1):
			r = l + (r - l) / 3 * 2
		elif m1 + d / (m1 + 1) <= min(n, d):
			a = 'YES'
			break
		else:
			l = l + (r - l) / 3
			r = l + (r - l) / 3 * 2
	if l != 0:
		q = int(l - 1e-09) + 1
	else:
		q = 0
	if a == 'YES' or q + d / (q + 1) <= min(n, d):
		print('YES')
	else:
		print('NO')


from math import ceil, sqrt
K = 10000
for case in range(int(input())):
	(n, d) = map(int, input().split())
	D = (n - 1) ** 2 - 4 * (d - n)
	if D < 0:
		D = 0
	x = int((n - 1 + sqrt(D)) / 2)
	start = 0 if x < K else x - K
	end = x + K
	ans = 'NO'
	for i in range(start, end):
		if i + ceil(d / (i + 1)) <= n:
			ans = 'YES'
			break
	print(ans)


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	x = d
	for i in range(1, 40000):
		x = min(x, i + (d + i) // (i + 1))
	if x <= n:
		print('YES')
	else:
		print('NO')


from math import *
from collections import *
import sys
sys.setrecursionlimit(10 ** 9)
t = int(input())
for y in range(t):
	(d, n) = map(int, input().split())
	x = int(sqrt(n))
	ans = x - 1 + ceil(n / x)
	if ans > d:
		print('NO')
	else:
		print('YES')


import math

def test(n, d):
	for x in range(int(math.sqrt(d)) + 100):
		if x + (d + x) // (x + 1) <= n:
			return True
	return False
T = int(input())
for _ in range(T):
	(n, d) = [int(x) for x in input().split()]
	if test(n, d):
		print('YES')
	else:
		print('NO')


q = int(input())
for ew in range(q):
	(n, d) = map(int, input().split())
	x = 0
	while (x + 10) ** 2 <= d:
		x += 1
	dup = 1
	for i in range(100):
		if x + i + (d + x + i) // (x + 1 + i) <= n:
			print('YES')
			dup = 0
			break
	if dup:
		print('NO')


import math
for _ in range(int(input())):
	(l, p) = map(int, input().split())
	x = l // 2
	y = math.ceil(p / (x + 1))
	if x + y <= l:
		print('YES')
	else:
		print('NO')


from math import sqrt, ceil, floor
t = int(input())
for _ in range(t):
	(n, d) = list(map(int, input().split()))
	if d <= n:
		print('YES')
	else:
		x = sqrt(d) - 1
		x0 = ceil(x)
		x1 = floor(x)
		if x0 + ceil(d / (x0 + 1)) <= n:
			print('YES')
		elif x1 + ceil(d / (x1 + 1)) <= n:
			print('YES')
		else:
			print('NO')


import math
t = int(input())

def f(x, d):
	y = math.ceil(d / (x + 1))
	return x + y
while t > 0:
	nd = input().split()
	(n, d) = (int(nd[0]), int(nd[1]))
	s = math.sqrt(d)
	s = math.floor(s)
	mn = max(s - 2, 0)
	mx = min(s + 3, d)
	flag = True
	for i in range(mn, mx):
		if f(i, d) <= n:
			print('YES')
			flag = False
			break
	if flag:
		print('NO')
	t -= 1


import math
t = int(input())
for i in range(t):
	q = input().split()
	n = int(q[0])
	d = int(q[1])
	c = 0
	if n >= d:
		print('YES')
	else:
		for j in range(1, n // 2 + 1):
			a = j + int(math.ceil(d / (j + 1)))
			if a <= n:
				print('YES')
				c = 1
				break
		if c == 0:
			print('NO')


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	(l, r) = (0, n)
	while l < r:
		m = l + (r - l) // 2
		temp = m + math.ceil(d / (m + 1))
		if temp > n:
			l = m + 1
		else:
			print('YES')
			break
	else:
		print('NO')


t = int(input())
for i in range(t):
	input_str = input()
	n = int(input_str.split(' ')[0])
	d = int(input_str.split(' ')[1])
	delta = (n + 1) ** 2 - 4 * d
	if delta < 0:
		print('NO')
		continue
	xmin = (n - 1 - delta ** 0.5) / 2
	xmax = (n - 1 + delta ** 0.5) / 2
	start_x = int(max(xmin, 0))
	end_x = int(xmax) + 1
	get_results = False
	for x in range(start_x, end_x):
		check = x + int(d / (x + 1)) + int(d % (x + 1) > 0)
		if check <= n:
			get_results = True
			break
	if get_results:
		print('YES')
	else:
		print('NO')


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	max = d
	if d <= n:
		print('YES')
	else:
		ans = 0
		cnt = 0
		for i in range(int(sqrt(d)) + 1):
			ans = i
			ans += d // (i + 1)
			if d % (i + 1):
				ans += 1
			if ans <= n:
				cnt = 1
			if cnt:
				break
		if cnt:
			print('YES')
		else:
			print('NO')


N = int(input())
from math import ceil
for _ in range(N):
	(n, d) = list(map(int, input().split()))
	if d <= n:
		print('YES')
	else:
		for i in range(1, n):
			val = ceil(d / (i + 1)) + i
			if val <= n:
				print('YES')
				break
		else:
			print('NO')


from math import ceil
t = int(input())
for _ in range(t):
	(n, d) = list(map(int, input().split(' ')))
	d = (1 - n) ** 2 - 4 * (d - n)
	if d >= 0:
		print('YES')
	else:
		print('NO')


import sys

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

def debug(*var, sep=' ', end='\n'):
	print(*var, file=sys.stderr, end=end, sep=sep)
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
(t,) = I()
while t:
	t -= 1
	(n, d) = I()
	ans = 'NO'
	for x in range(min(n, int(d ** 0.5) + 1)):
		if x + ceil(d / (x + 1)) <= n:
			ans = 'YES'
	print(ans)


import sys, math
test_num = int(sys.stdin.readline())
for test_cnt in range(test_num):
	(n, d) = sys.stdin.readline().strip().split(' ')
	(n, d) = (int(n), int(d))
	finish = 'NO'
	for ii in range(n):
		res = math.ceil(d / (ii + 1))
		if res <= n - ii:
			finish = 'YES'
			break
	print(finish)


import math as m
t = int(input())
nans = 0
for i in range(t):
	(n, d) = map(int, input().split())
	for j in range(n):
		s = m.ceil(d / (j + 1)) + j
		if s <= n:
			print('YES')
			nans += 1
			break
	if nans == i:
		print('NO')
		nans += 1


tests = int(input())
for te in range(tests):
	(n, d) = list(map(int, input().split()))
	if d <= n:
		print('YES')
	else:
		i = 1
		flag = 0
		while i <= n:
			answer = i
			k = (d + i) // (i + 1)
			answer += k
			if answer <= n:
				flag = 1
				print('YES')
				break
			if k == 1:
				break
			index = d // (k - 1)
			if index == i:
				i = i + 1
			else:
				i = index
		if flag == 0:
			print('NO')


from math import *
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	low = 0
	high = n
	flag = False
	if d <= n:
		print('YES')
		continue
	while low < high:
		mid = (low + high) // 2
		if mid + int(ceil(d / (mid + 1))) <= n:
			flag = True
			break
		else:
			high = mid
	if flag:
		print('YES')
	else:
		print('NO')


import math as m
for i in range(0, int(input())):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		x = int(n / 2)
		flag = 0
		while x != 0 and flag != 1:
			if m.ceil(x + d / (x + 1)) <= n:
				print('YES')
				flag = 1
				break
			else:
				x = x // 2
		if flag == 0:
			print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	t = True
	for i in range(n):
		if n >= i + math.ceil(d / (i + 1)):
			print('YES')
			t = False
			break
	if t:
		print('No')


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	D = 1 + n
	B = 4 * d
	if D ** 2 >= B:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(n, k) = [int(x) for x in input().split()]
	if k <= n:
		print('YES')
	else:
		c = 2 - k
		b = 2
		d = 4 - 4 * c
		if d < 0:
			print('NO')
		else:
			x1 = -b + pow(d, 0.5)
			x1 = x1 / 2
			a = math.floor(x1)
			b = math.ceil(x1)
			a = (a ** 2 + 2 * a + k) // (a + 1)
			b = (b ** 2 + 2 * b + k) // (b + 1)
			if a >= 0 and a <= n or (b >= 0 and b <= n):
				print('YES')
			else:
				print('NO')


import math

def main():
	N = int(input())
	for i in range(N):
		line = input()
		arr = list(map(int, line.split()))
		n = arr[0]
		d = arr[1]
		if n == d:
			print('YES')
			continue
		l = 0
		r = n
		m = 0
		while l < r:
			m = int((l + r + 1) / 2)
			if m + math.ceil(float(d) / float(m + 1)) <= n:
				print('YES')
				break
			if m >= math.ceil(float(d) / float(m + 1)):
				r = m - 1
			else:
				l = m
		if l < r:
			continue
		if l == r and m + math.ceil(float(d) / float(m + 1)) <= n:
			print('YES')
		else:
			print('NO')
main()


import math
T = int(input())
while T > 0:
	work = 'NO'
	(n, d) = list(map(int, input().split()))
	if n >= d:
		print('YES')
	else:
		for x in range(1, int(d ** 0.5) + 1):
			frac = math.ceil(d / (x + 1))
			if x + frac <= n:
				work = 'YES'
				break
		print(work)
	T -= 1


import math
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	c = 0
	if a >= b:
		print('YES')
	else:
		for i in range(a, -1, -1):
			t = i + math.ceil(b / (i + 1))
			if t <= a:
				c = 1
				break
		if c == 0:
			print('NO')
		else:
			print('YES')


import math
for i in range(int(input())):
	(n, d) = map(int, input().split())
	i = 1
	flag = 0
	if d <= n:
		print('Yes')
	else:
		b = (1 - n) ** 2
		c = 4 * (d - n)
		if b - c >= 0:
			print('Yes')
		else:
			print('No')


import math

def program():
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		return 0
	for i in range(1, n):
		x = math.ceil(d / (i + 1))
		if i + x <= n:
			print('YES')
			return 0
	print('NO')
t = int(input())
for i in range(t):
	program()


import math

def check(n, d):
	for x in range(1, n):
		if x + math.ceil(d / (x + 1)) <= n:
			return True
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	elif check(n, d):
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for z in range(t):
	(n, d) = [int(x) for x in input().split()]
	f = 0
	if d <= n:
		print('YES')
		f = 1
	else:
		for i in range(1, int(math.sqrt(d))):
			x = i + math.ceil(d / (i + 1))
			if x <= n:
				print('YES')
				f = 1
				break
	if f == 0:
		print('NO')


import math
for _ in range(int(input())):
	(n, d) = list(map(int, input().split()))
	x = int(d ** 0.5 - 1)
	k = x + math.ceil(d / (x + 1))
	if k <= n:
		print('YES')
	else:
		print('NO')


from math import ceil
nt = int(input())
for it in range(nt):
	(n, d) = map(int, input().split())
	go = lambda k: k + int(ceil(d / (k + 1)))
	if d <= n:
		print('YES')
	else:
		c1 = int(d ** 0.5 - 1)
		c2 = int(ceil(d ** 0.5 - 1))
		found = False
		if c1 >= 0 and go(c1) <= n:
			found = True
		if c2 >= 0 and go(c2) <= n:
			found = True
		print('YES' if found else 'NO')


import math
t = int(input())
while t > 0:
	(n, d) = [int(ele) for ele in input().split()]
	if d <= n:
		print('YES')
	else:
		j = int(math.sqrt(d))
		flag = 0
		for i in range(1, j + 2):
			p = int(d / (i + 1))
			if d % (i + 1) != 0:
				p += 1
			if i + p <= n:
				flag = 1
				break
		if flag == 1:
			print('YES')
		else:
			print('NO')
	t -= 1


import math
T = int(input())
for _ in range(T):
	(d, n) = input().split()
	(d, n) = (int(d), int(n))
	for i in range(d):
		if i + math.ceil(n / (i + 1)) <= d:
			print('YES')
			break
		if i == d - 1:
			print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	temp = int(d ** 0.5 - 1)
	if d <= n:
		print('YES')
	elif temp + math.ceil(d / (temp + 1)) <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	a = 0
	(n, d) = map(int, input().split())
	for i in range(int(d ** 0.5) + 1):
		if n >= i + math.ceil(d / (i + 1)):
			print('YES')
			a = 1
			break
	if a == 0:
		print('NO')


from math import ceil
n = int(input())
for i in range(n):
	(dead, d) = map(int, input().split())
	ans = 'NO'
	for i in range(dead):
		if dead >= ceil(d / (i + 1)) + i:
			ans = 'YES'
			break
	print(ans)


import math
tc = int(input())
for _ in range(tc):
	(n, d) = [int(x) for x in input().split()]
	x = 0
	i = 0
	s = 'NO'
	if d <= n:
		s = 'YES'
	else:
		while i <= n:
			i += 1
			x = i + math.ceil(d / (i + 1))
			if x <= n:
				s = 'YES'
				break
	print(s)


from math import ceil, sqrt
from sys import stdin
t = int(stdin.readline())
while t:
	(d, n) = map(int, stdin.readline().split())
	ans = 'YES'
	x = ceil(sqrt(n)) - 1
	if x + ceil(n / (x + 1)) > d and (x > 0 and x - 1 + ceil(n / x) > d) and (x + 1 + ceil(n / (x + 2)) > d):
		ans = 'NO'
	print(ans)
	t -= 1


import math

def opt(d, x):
	return x + math.ceil(d / (x + 1))
T = int(input())
for i in range(T):
	(n, d) = [int(x) for x in input().strip().split()]
	ans = 'NO'
	if d <= n:
		ans = 'YES'
	for x in range(math.ceil(math.sqrt(d))):
		if opt(d, x) <= n:
			ans = 'YES'
			break
	print(ans)


import math

def solution(n, d):
	for x in range(0, n + 1):
		if x + math.ceil(d / (x + 1)) <= n:
			return 'YES'
	return 'NO'
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	print(solution(n, d))


import math
t = int(input())
while t:
	t -= 1
	(n, d) = map(int, input().split())
	a = int(n / 2)
	b = n - a
	if n == d:
		print('YES')
		continue
	if math.ceil(d / (a + 1)) + a <= n or math.ceil(d / (b + 1)) + b <= n:
		print('YES')
	else:
		print('NO')


def f(d, lol):
	soln = d / (lol + 1)
	if soln > d / (lol + 1):
		return soln + 1
	return soln
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	lol = int(d ** 0.5) - 1
	ceil = f(d, lol)
	lol2 = lol + ceil
	if lol2 <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = [int(z) for z in input().split(' ')]
	m = 10 ** 10
	q = int(d ** 0.5)
	for i in range(int(q ** 0.5), q + 100):
		m = min(m, i + math.ceil(d / (i + 1)))
	if m <= n or d <= n:
		print('YES')
	else:
		print('NO')


import math

def check(n, d):
	return n * n + 2 * n + 1 >= 4 * d
t = int(input())
while t:
	t -= 1
	(n, d) = map(int, input().split())
	if check(n, d):
		print('YES')
	else:
		print('NO')


t = int(input())
from math import ceil
for _ in range(t):
	(n, d) = [int(x) for x in input().split()]
	if n >= d:
		print('YES')
	else:
		minimum_deepshri = 10 ** 10 + 1
		i_love_you_deepshri = 1
		while i_love_you_deepshri * i_love_you_deepshri <= d:
			ans = i_love_you_deepshri + ceil(d / (i_love_you_deepshri + 1))
			minimum_deepshri = min(minimum_deepshri, ans)
			i_love_you_deepshri += 1
		if minimum_deepshri > n:
			print('NO')
		else:
			print('YES')


t = int(input())
for tc in range(t):
	(n, d) = map(int, input().split())
	cnt = 0
	for x in range(0, int(d ** (1 / 2))):
		if x + d / (x + 1) <= n:
			cnt += 1
	if cnt > 0:
		print('YES')
	else:
		print('NO')


from math import sqrt
for _ in range(int(input())):
	(n, d) = [int(x) for x in input().split()]
	i = 0
	while i < sqrt(d):
		if i + (d + i) // (i + 1) <= n:
			break
		i += 1
	print('YES') if i < sqrt(d) else print('NO')


t = int(input())
import math
for _ in range(t):
	(n, d) = map(int, input().split())
	x1 = math.floor(math.sqrt(d) - 1)
	x2 = math.ceil(math.sqrt(d) - 1)
	y1 = x1 + math.ceil(d / (x1 + 1))
	y2 = x2 + math.ceil(d / (x2 + 1))
	if min(y1, y2) <= n:
		print('YES')
	else:
		print('NO')


def f(x):
	y = x + 1
	return x + d / y
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		left = 0
		right = d + n
		for i in range(300):
			middle1 = left + (right - left) / 3
			middle2 = right - (right - left) / 3
			a = f(middle1)
			b = f(middle2)
			if a == b:
				(left, right) = (middle1, middle2)
			elif a < b:
				right = middle2
			else:
				left = middle1
		if f(left) <= n or f(right) <= n:
			print('YES')
		else:
			print('NO')


from math import ceil
a = int(input())
for i in range(a):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		counter = 1
		current_n_of_days = counter + ceil(d / (counter + 1))
		previous_result = current_n_of_days + 1
		while current_n_of_days <= previous_result:
			if current_n_of_days <= n:
				print('YES')
				break
			else:
				counter += 1
				previous_result = current_n_of_days
				current_n_of_days = counter + ceil(d / (counter + 1))
		else:
			print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	prev = None
	ceil = math.ceil(d ** 0.5)
	ok = False
	for dd in range(ceil, -1, -1):
		target = dd + math.ceil(d / (dd + 1))
		if target <= n:
			ok = True
			break
		if prev and target > prev:
			break
	if not ok:
		prev = None
		for dd in range(ceil, ceil * 2):
			target = dd + math.ceil(d / (dd + 1))
			if target <= n:
				ok = True
				break
			if prev and target > prev:
				break
	print('YES' if ok else 'NO')


t = int(input())
for _ in range(t):
	(n, d) = list(map(int, input().split()))
	if (1 - n) ** 2 - 4 * (d - n) >= 0:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		sqrt = int(pow(d, 0.5))
		need = sqrt - 1 + int(d / sqrt) + int(d / sqrt != int(d / sqrt))
		if need <= n:
			print('YES')
		else:
			print('NO')


import math
for case in range(int(input())):
	(n, d) = [int(x) for x in input().split()]
	if n >= d:
		print('YES')
		continue
	x = 1
	no_ans = True
	for x in range(1, int(math.sqrt(d))):
		if math.ceil(d / (x + 1)) + x <= n:
			print('YES')
			no_ans = False
			break
	if no_ans:
		print('NO')

def calc(d):
	for x in range(1, d + 1):
		print(x, x + math.ceil(d / (x + 1)))


import sys, math
import io, os

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

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
mod = int(1000000000.0) + 7
for t in range(int(data())):
	(n, d) = mdata()
	if (n - 1) ** 2 + 4 * (n - d) >= 0:
		out('YES')
	else:
		out('NO')


from math import *
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	x = int(sqrt(d)) - 1
	if int(sqrt(d)) - 1 + ceil(d / (x + 1)) <= n:
		print('YES')
	else:
		print('NO')


import math
T = int(input())
for i in range(T):
	(n, d) = list(map(int, input().split()))
	if d <= n:
		print('YES')
		continue
	else:
		x = int(d ** 0.5) - 1
		opt = x + math.ceil(d / (x + 1))
		if opt <= n:
			print('YES')
		else:
			print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = list(map(int, input().split()))
	for x in range(n):
		c = 0
		if x + math.ceil(d / (x + 1)) <= n:
			c += 1
			break
	if c == 1:
		print('YES')
	else:
		print('NO')


import math
ff = int(input())
for ii in range(0, ff):
	x = input()
	(n, d) = [int(dd) for dd in x.split()]
	can = False
	for x in range(0, n):
		tot = x + math.ceil(d / (x + 1))
		if tot <= n:
			can = True
			break
	if can is True:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = [int(x) for x in input().split()]
	x = math.ceil(math.sqrt(d) - 1)
	if n >= x + math.ceil(d / (x + 1)):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a >= b:
		print('YES')
	else:
		x = 1
		while x + 1 <= a:
			y = (b - 1) // (a - x + 1) + 1
			if y == x:
				print('YES')
				break
			x = y
		else:
			print('NO')


from math import ceil
t = int(input())
while t:
	t -= 1
	(n, d) = map(int, input().split())
	flag = 0
	for i in range(1, ceil(d ** (1 / 2))):
		val = i + ceil(d / (i + 1))
		if val <= n:
			flag = 1
			break
	if d <= n or flag == 1:
		print('YES')
	else:
		print('NO')


import math
n = int(input())
for i in range(n):
	(n, d) = map(int, input().split())
	x = math.floor(d ** 0.5 - 1)
	rst = x + math.ceil(d / (x + 1))
	if rst <= n:
		print('YES')
	else:
		print('No')


from math import ceil
T = int(input())
for _ in range(T):
	(n, d) = map(int, input().split())
	(a, b) = (0, n)
	for x in range(0, n):
		total = x + ceil(d / (x + 1))
		if total <= n:
			print('YES')
			break
	else:
		print('NO')


import math
n = int(input())
ans = []
while n:
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	flag = 0
	if y <= x:
		ans.append('YES')
	else:
		z = 1
		while z < x:
			flag = 0
			opt = math.ceil(y / (z + 1))
			if x - z >= opt:
				flag = 1
				break
			z += 1
		if flag == 0:
			ans.append('NO')
		else:
			ans.append('YES')
	n -= 1
for i in ans:
	print(i)


n = int(input())
for x in range(n):
	(a, b) = list(map(int, input().split()))
	value = int(a // 2)
	if (a - value) * (value + 1) >= b:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
while t > 0:
	t -= 1
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		q = True
		a = math.sqrt(d)
		for i in range(int(a + 1)):
			y = i + 1
			if d % y == 0:
				z = int(d / y)
			else:
				z = int(d / y) + 1
			if z + i <= n:
				q = True
				print('YES')
				break
			else:
				q = False
		if q == False:
			print('NO')


from math import ceil
test = int(input())
for i in range(test):
	flag = 0
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		for i in range(1, n):
			a = d / (i + 1)
			if i + ceil(a) <= n:
				flag = 1
				break
		if flag == 1:
			print('YES')
		else:
			print('NO')


try:
	import math
	t = int(input())
	while t > 0:
		(n, d) = map(int, input().split())
		if d <= n:
			print('YES')
			continue
		f = 0
		i = 1
		while i * i <= d:
			x = i - 1
			r = math.ceil(float(d) / float(i))
			r += x
			if r <= n:
				f = 1
				break
			i += 1
		if f:
			print('YES')
		else:
			print('NO')
		t -= 1
except:
	pass


tt = int(input())
import math
for _ in range(tt):
	(n, k) = map(int, input().split())
	c = 1 + 4 * k
	c = math.sqrt(c)
	c -= 1
	ans = 'NO'
	c = c // 2
	if c + math.ceil(k / (c + 1)) <= n:
		ans = 'YES'
	elif c - 1 + math.ceil(k / c) <= n:
		ans = 'YES'
	elif c + 1 + math.ceil(k / (c + 2)) <= n:
		ans = 'YES'
	print(ans)


from math import *

def time(x):
	return x + d / (x + 1)
t = int(input())
for tt in range(t):
	(n, d) = map(int, input().split())
	l = 0
	r = n
	for i in range(300):
		m1 = (l * 2 + r) / 3
		m2 = (r * 2 + l) / 3
		if time(m1) > time(m2):
			l = m1
		else:
			r = m2
	a = round(l)
	if a + ceil(d / (a + 1)) <= n:
		print('YES')
	else:
		print('NO')


import math as m
tc = int(input())
while tc > 0:
	(n, d) = map(int, input().split())
	e = m.sqrt(d)
	e = m.ceil(e - 1.0)
	f = m.floor(e - 1.0)
	if m.ceil(e + d / (e + 1)) <= n or m.ceil(f + d / (f + 1)) <= n:
		print('YES')
	else:
		print('NO')
	tc -= 1


import math
for i in range(int(input())):
	(n, d) = map(int, input().split())
	if d > n:
		j = 1
		while j < n:
			if j + math.ceil(d / (j + 1)) <= n:
				j = n + 2
			j += 1
		if j == n + 3:
			print('YES')
		else:
			print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	x = -1
	p = int(d ** 0.5) + 1
	for i in range(p + 1):
		s = i + d // (i + 1)
		if d % (i + 1) != 0:
			s += 1
		if s <= n:
			x = i
			break
	if x == -1:
		print('NO')
	else:
		print('YES')


import math
n = int(input())
for _ in range(n):
	(a, b) = map(int, input().split())
	start = 0
	end = a
	done = 0
	while start < end:
		mid = (start + end) // 2
		mm = math.ceil(b / (mid + 1))
		temp = mid + mm
		if temp <= a:
			print('YES')
			done = 1
			break
		elif mid > mm:
			end = mid - 1
		else:
			start = mid + 1
	if not done:
		print('NO')


t = int(input())
ans = []
for i in range(t):
	nd = list(map(int, input().split()))
	(n, d) = nd
	if d > n:
		output = d
		finala = 0
		for k in range(int(d ** 0.5)):
			if d % (k + 1) == 0:
				dk1 = d // (k + 1)
			else:
				dk1 = d // (k + 1) + 1
			finala = k + dk1
			if finala < output:
				output = finala
		if finala > n:
			ans.append('NO')
		else:
			ans.append('YES')
	else:
		ans.append('YES')
for i in ans:
	print(i)


t = int(input())
while t:
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		disc = (n - 1) ** 2 - 4 * (d - n)
		if disc < 0:
			print('NO')
		else:
			disc = disc ** 0.5
			a = (n - 1 + disc) / 2
			b = (n - 1 - disc) / 2
			if a < 0:
				print('NO')
			elif a - b >= 0:
				print('YES')
	t -= 1


from math import ceil

def read_tokens():
	return input().strip().split(' ')

def read_ints():
	return [int(s) for s in read_tokens()]

def f(n: int, d: int) -> bool:
	good = 0
	bad = n
	while bad - good > 1:
		t = (good + bad) // 2
		if good_enough(n, d, t):
			good = t
		else:
			bad = t
	return good_enough(n, d, good)

def good_enough(n: int, d: int, x: int) -> bool:
	new_time = ceil(d / (x + 1))
	total = x + new_time
	return total <= n
(T,) = read_ints()
for _ in range(T):
	(n, d) = read_ints()
	yes = f(n, d)
	print('YES' if yes else 'NO')


t = int(input())
for i in range(t):
	(N, D) = map(int, input().split())
	if (1 - N) ** 2 - 4 * (D - N) < 0:
		print('NO')
	else:
		print('YES')


import sys
from math import ceil
tests = int(input())
for _ in range(tests):
	(n, d) = list(map(int, sys.stdin.readline().split()))
	ok = False
	for i in range(n, -1, -1):
		result = i + ceil(d / (i + 1))
		if result <= n:
			print('YES')
			ok = True
			break
	if not ok:
		print('NO')


from math import *
for u in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		for i in range(1, int(sqrt(d)) + 1):
			if i + ceil(d / (i + 1)) <= n:
				print('YES')
				break
		else:
			print('NO')


from math import ceil
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	x = int(d ** 0.5) - 1
	to_spend = d
	for i in range(-10, 10, 1):
		to_spend = min(to_spend, x + ceil(1.0 * d / (x + 1)))
	if to_spend <= n:
		print('YES')
	else:
		print('NO')


import math
for t in range(int(input())):
	(n, d) = list(map(int, input().split()))
	if n % 2 == 0:
		x = n // 2 - 1
	else:
		x = n // 2
	ans = x + int(math.ceil(d / (x + 1)))
	if ans <= n:
		print('YES')
	else:
		print('NO')


import math

def fun(n, d):
	if d <= n:
		return 'YES'
	x = 1
	while x < n:
		if x + math.ceil(d / (x + 1)) <= n:
			return 'YES'
		x += 1
	return 'NO'
for _ in range(int(input())):
	(n, d) = list(map(int, input().split()))
	print(fun(n, d))


import math

def solve(n, d):
	for i in range(n):
		if i + math.ceil(d / (i + 1)) <= n:
			return 'YES'
	return 'NO'
t = int(input())
while t:
	(n, d) = map(int, input().split())
	print(solve(n, d))
	t -= 1


from math import *
t = int(input(''))
for i in range(t):
	e = input('')
	L = [int(i) for i in e.split()]
	n = L[0]
	d = L[1]
	if d <= n:
		print('YES')
	else:
		x = sqrt(d)
		x1 = int(x) - 1
		x2 = x1 + 1
		Test1 = True
		Test2 = True
		a1 = d / (x1 + 1)
		a2 = d / (x2 + 1)
		if a2 - int(a2) != 0.0:
			a2 = int(a2) + 1
		if a1 - int(a1) != 0.0:
			a1 = int(a1) + 1
		if x1 + a1 > n:
			Test1 = False
		if x2 + a2 > n:
			Test2 = False
		if Test1 == False and Test2 == False:
			print('NO')
		else:
			print('YES')


from math import *
t = int(input())
for x in range(t):
	temp = input()
	temp = temp.split()
	n = int(temp[0])
	d = int(temp[1])
	temp = ceil(sqrt(d)) - 1
	if d == 1:
		temp = 1
	else:
		temp = temp + ceil(d / (temp + 1))
	if temp <= n:
		print('YES')
	else:
		print('NO')


import math

def fact(n):
	ans = 1
	for i in range(2, n + 1):
		ans *= i
	return ans

def comb(n, c):
	return fact(n) // (fact(n - c) * c)
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		ok = False
		for i in range(1, n + 1):
			if i + math.ceil(d / (i + 1)) <= n:
				ok = True
				break
		if ok:
			print('YES')
		else:
			print('NO')


t = int(input())
i = 0
while i < t:
	x = input().split(' ')
	n = int(x[0])
	d = int(x[1])
	bac = (n - 1) * (n - 1) + 4 * (n - d)
	sol = (n - 1 + bac) / 2
	if bac >= 0 and sol >= 0:
		print('YES')
	else:
		print('NO')
	i = i + 1


import sys
input = sys.stdin.readline
import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	x = int(d ** 0.5)
	if n >= math.ceil(d / x) + x - 1:
		print('YES')
	else:
		print('NO')


import sys
sys.setrecursionlimit(10 ** 5)
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, d) = [int(item) for item in input().split()]
	ok = False
	for x in range(d):
		val = x + (d + x) // (x + 1)
		if val <= n:
			ok = True
			print('YES')
			break
		if (x - 1) * (x - 1) > d:
			break
	if not ok:
		print('NO')


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if n % 2 == 0:
		if d % (n // 2 + 1) == 0:
			x = d // (n // 2 + 1)
		else:
			x = d // (n // 2 + 1) + 1
		if n // 2 + x <= n:
			print('YES')
		else:
			print('NO')
	else:
		if d % (n // 2 + 1) == 0:
			x = d // (n // 2 + 1)
		else:
			x = d // (n // 2 + 1) + 1
		if d % (n // 2 + 2) == 0:
			y = d // (n // 2 + 2)
		else:
			y = d // (n // 2 + 2) + 1
		if n // 2 + x <= n or n // 2 + 1 + y <= n:
			print('YES')
		else:
			print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = [int(s) for s in input().split()]
	if d <= n:
		print('YES')
		continue
	else:
		for x in range(n):
			if x + math.ceil(d / (x + 1)) <= n:
				print('YES')
				break
		else:
			print('NO')


import math
test_count = int(input())
cal = lambda x, d: x + math.ceil(d / (x + 1))
for t in range(test_count):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
		continue
	start = 0
	end = n
	ans = -1
	while start <= end:
		mid = (start + end) // 2
		if cal(mid, d) > n:
			end = mid - 1
		else:
			ans = mid
			break
	if ans == -1:
		print('NO')
	else:
		print('YES')


import sys
import math
import bisect

def query_value(d, x):
	return math.ceil(x + d / (x + 1))

def solve(n, d):
	if d <= n:
		return 'YES'
	for i in range(1, 10 ** 5 + 1):
		if query_value(d, i) <= n:
			return True
	return False

def main():
	for _ in range(int(input())):
		(n, d) = map(int, input().split())
		if solve(n, d):
			print('YES')
		else:
			print('NO')
main()


import math
for _ in range(int(input())):
	(n, d) = list(map(int, input().split()))
	flag = False
	for i in range(n):
		if i + int(math.ceil(d / (i + 1))) <= n:
			flag = True
			break
	if flag:
		print('YES')
	else:
		print('NO')


t = int(input())
import math
for i in range(t):
	(n, d) = map(int, input().split())
	if n >= math.sqrt(d) * 2 - 1:
		print('YES')
	else:
		print('NO')


import math
import os

def accept(x, a, b):
	return x + math.ceil(b / (x + 1)) <= a
n = int(input())
for i in range(n):
	(a, b) = list(map(int, input().split(' ')))
	if accept(a // 2, a, b) or accept(math.ceil(a / 2), a, b):
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split(' '))
	x = n // 2
	p = math.ceil(d / (x + 1))
	s = x + p
	if d <= n:
		print('YES')
	elif s <= n:
		print('YES')
	else:
		print('NO')


kl = int(input())
for l in range(kl):
	p = [int(i) for i in input().split()]
	x = int(p[1] ** 0.5)
	if min(x - -p[1] // (x + 1), x - 1 - -p[1] // x) <= p[0]:
		print('YES')
	else:
		print('NO')


import math
T = int(input())
for i in range(T):
	data = input().split()
	n = int(data[0])
	d = int(data[1])
	if d <= n:
		print('YES')
	else:
		ans = 0
		for j in range(n):
			if j + math.ceil(d / (j + 1)) <= n:
				print('YES')
				ans = 1
				break
		if ans == 0:
			print('NO')


import math
t = int(input())
for i in range(t):
	ans = 'NO'
	(n, d) = map(int, input().split())
	for x in range(n // 2 + 1):
		a = math.ceil(d / (x + 1))
		b = x + a
		if b <= n:
			ans = 'YES'
			break
	print(ans)


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	x = int(d ** 0.5 - 1)
	flag = False
	for y in (x - 1, x, x + 1):
		if y + math.ceil(d / (x + 1)) < n:
			flag = True
			break
	if flag:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	d = a[1]
	s = math.floor(math.sqrt(d))
	if a[0] >= a[1]:
		print('YES')
		continue
	if d == 1:
		print('YES')
		continue
	if s * s < d:
		if s >= 2:
			if s - 1 + math.ceil(d / s) <= a[0]:
				print('YES')
				continue
		if s + math.ceil(d / (s + 1)) <= a[0]:
			print('YES')
			continue
	elif s - 1 + s <= a[0]:
		print('YES')
		continue
	print('NO')


from math import ceil, floor
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	elif d == 1:
		print('NO')
	elif floor(d ** (1 / 2) - 1) + ceil(d / (floor(d ** (1 / 2) - 1) + 1)) <= n:
		print('YES')
	else:
		print('NO')


import math

def optimize():
	for _ in range(t):
		(n, d) = [int(x) for x in input().split()]
		x = math.floor(((1 + 4 * d) ** 0.5 - 0.5) / 2)
		res = math.ceil(d / (x + 1)) + x
		if res <= n:
			yield 'YES'
		else:
			yield 'NO'
t = int(input())
ans = optimize()
print(*ans, sep='\n')


from math import ceil
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('yes')
		continue
	x = 1
	while x + ceil(d / (x + 1)) > n:
		x += 1
		if x > n / 2:
			break
	print('yes' if x < n / 2 else 'no')


t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	x1 = int(d ** 0.5 - 1)
	x2 = int(d ** 0.5)
	time = min(x1 + 1 + (d - 1) // (x1 + 1), x2 + 1 + (d - 1) // (x2 + 1))
	if time <= n:
		print('YES')
	else:
		print('NO')


import math
p = int(input())
while p:
	(n, k) = map(int, input().split())
	b = True
	for i in range(0, n):
		a = math.ceil(k / (i + 1))
		if i + a <= n:
			print('YES')
			b = False
			break
	if b:
		print('NO')
	p -= 1


T = int(input())
from math import sqrt, ceil
for z in range(T):
	(n, d) = map(int, input().split())
	f = False
	for i in range(0, ceil(sqrt(d)) + 1):
		if ceil(d / (i + 1)) <= n - i:
			print('YES')
			f = True
			break
	if f == False:
		print('NO')


import math
t = int(input())
while t > 0:
	t -= 1
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		x = d ** 0.5 - 1
		a = math.floor(x)
		b = math.ceil(x)
		if a + math.ceil(d / (a + 1)) <= n:
			print('YES')
			continue
		elif b + math.ceil(d / (b + 1)) <= n:
			print('YES')
			continue
		else:
			print('NO')


try:
	for _ in range(int(input())):
		(n, d) = map(int, input().split())
		if d <= n:
			print('YES')
		else:
			temp = n // 2
			while temp > 0:
				x = d / (temp + 1)
				if x.is_integer():
					ans = temp + int(x)
					if n >= ans:
						print('YES')
						break
				else:
					ans = temp + int(x) + 1
					if n >= ans:
						print('YES')
						break
				temp = temp - 1
			else:
				print('NO')
except Exception as e:
	print(e)


import sys
input = sys.stdin.readline
flush = sys.stdout.flush

def iin():
	return int(input())

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

def main():
	from math import sqrt, ceil
	t = iin()
	while t:
		t -= 1
		(n, d) = lin()
		x = sqrt(d)
		x1 = ceil(x)
		x = int(x)
		if x + (d + x - 1) // x <= n + 1 or x1 + (d + x1 - 1) // x1 <= n + 1:
			print('YES')
		else:
			print('NO')
main()


import math
for _ in [0] * int(input()):
	(n, d) = map(int, input().split())
	sqrtd = int(d ** 0.5)
	if d <= n or sqrtd - 1 + math.ceil(d / sqrtd) <= n:
		print('YES')
	else:
		print('NO')


import math

def solve(n, d):
	if d <= n:
		return 'YES'
	else:
		for x in range(1, n):
			k = x + math.ceil(d / (x + 1))
			if k <= n:
				return 'YES'
		return 'NO'
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	print(solve(n, d))


from math import ceil
for i in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		x = 1
		com = float('inf')
		res = 'NO'
		while 1:
			k = x + ceil(d / (x + 1))
			if k <= n:
				res = 'YES'
				break
			if k > com:
				break
			com = k
			x += 1
		print(res)


def main():
	(n, d) = list(map(int, input().split()))
	minimum = 10 ** 9 * 2
	if n > d:
		print('YES')
		return 0
	v = 0
	while v * v <= d:
		if d % (v + 1) == 0:
			l = d // (v + 1)
		else:
			l = d // (v + 1) + 1
		if v + l < minimum:
			minimum = v + l
		v += 1
	if minimum <= n:
		print('YES')
		return 0
	else:
		print('NO')
		return 0
t = int(input())
for i in range(t):
	main()


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	t1 = 1 - n
	t2 = 4 * (d - n)
	if t1 ** 2 - t2 >= 0:
		print('yes')
	else:
		print('no')


T = int(input())
for t in range(T):
	read = input().split()
	n = int(read[0])
	d = int(read[1])
	if d <= n:
		print('YES')
		continue
	delta = (1 - n) ** 2 - 4 * (d - n)
	if delta >= 0:
		print('YES')
		continue
	print('NO')


a = int(input())
r = 0
c = list()
while r < a:
	b = [int(b) for b in input().split()]
	if b[0] >= b[1]:
		c.append('YES')
	else:
		d = b[0] // 2
		if b[1] % (d + 1) == 0 and d + b[1] // (d + 1) <= b[0] or (b[1] % (d + 1) != 0 and d + 1 + b[1] // (d + 1) <= b[0]):
			c.append('YES')
		else:
			c.append('NO')
	r = r + 1
r = 0
while r < a:
	print(c[r])
	r = r + 1


import math
t = int(input())
while t > 0:
	(n, b) = map(int, input().split())
	a = n
	if a == b:
		print('YES')
	else:
		while a > 0:
			if math.ceil(b / (a + 1)) + a <= n:
				print('YES')
				break
			a = a - 1
		if a == 0:
			print('NO')
	t = t - 1


from sys import stdin

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

def check(n, d):
	a = (n - 1) * (n - 1) - 4 * (d - n)
	if a < 0:
		return False
	else:
		return True
test = int(stdin.readline())
while test:
	(n, d) = rl()
	if check(n, d):
		print('YES')
	else:
		print('NO')
	test -= 1


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

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

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

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

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

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

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

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

def solve():
	(n, d) = num_input()
	if n >= d:
		print('YES')
	else:
		b = 1 - n
		a = 1
		c = d - n
		b = b ** 2
		if b - 4 * a * c < 0:
			print('NO')
		else:
			print('YES')
t = int(input())
for _ in range(t):
	solve()


import math
t = int(input())
for q in range(t):
	(n, d) = map(int, input().split())
	eq = int(n / 2) + math.ceil(d / (int(n / 2) + 1))
	if d <= n or eq <= n:
		print('YES')
	else:
		print('NO')


def ceil(y):
	frac = y % 1
	if frac != 0:
		y = y // 1 + 1
	else:
		y = y // 1
	return y

def check(x):
	global n, d
	if x < 0:
		return False
	temp = x * x + (1 - n) * x + (d - n)
	if temp <= 0:
		return True
	else:
		return False
q = int(input())
for _ in range(q):
	(n, d) = list(map(int, input().split(' ')))
	(x1, x2) = ((n - 1) // 2, (n - 1) // 2 + 1)
	if check(x1) or check(x2):
		print('YES')
	else:
		print('NO')


from math import *
t = int(input())
for i in range(t):
	(n, d) = input().split()
	n = int(n)
	d = int(d)
	flag = False
	for j in range(max(0, int(sqrt(d)) - 5), min(int(sqrt(d)) + 6, n + 1)):
		if j + ceil(d / (j + 1)) <= n:
			flag = True
			break
	if flag == True:
		print('YES')
	else:
		print('NO')


import math
for i in range(int(input())):
	(n, d) = map(int, input().split())
	k = 0
	h = n
	if d > n:
		while n > 0:
			l = n - 1 + math.ceil(d / n)
			if l <= h:
				k = 1
				break
			n = n - 1
	if k == 1 or h >= d:
		print('YES')
	else:
		print('NO')


import math
T = int(input())
while T:
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		x = int(d ** 0.5) - 1
		y = int(d ** 0.5)
		z = int(d ** 0.5) + 1
		if x + math.ceil(d / (x + 1)) <= n:
			print('YES')
		elif y + math.ceil(d / (y + 1)) <= n:
			print('YES')
		elif z + math.ceil(d / (z + 1)) <= n:
			print('YES')
		else:
			print('NO')
	T -= 1


from math import sqrt
T = int(input())
for _ in range(T):
	(n, d) = map(int, input().split())
	x = max(int(sqrt(d)) - 1, 0)
	if x + (d + x) // (x + 1) <= n:
		print('YES')
	else:
		print('NO')


from math import ceil as cc
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	else:
		for i in range(1, n):
			ans = i + cc(d / (i + 1))
			if ans <= n:
				print('YES')
				break
		else:
			print('NO')


import math
t = int(input())
for i in range(0, t):
	(n, d) = [int(j) for j in input().split()]
	minSUM = math.ceil(2 * math.sqrt(d) - 1)
	if n >= minSUM:
		print('YES')
	else:
		print('NO')


import math

def solve(n, d):
	if d <= n:
		return 'YES'
	l = 0
	r = n
	while l < r:
		mid = (l + r) // 2
		if math.ceil(d / (mid + 1)) + mid <= n:
			return 'YES'
		r = mid
	return 'NO'
q = int(input())
while q:
	(n, d) = map(int, input().split(' '))
	print(solve(n, d))
	q -= 1


n = int(input())
C = [list(map(int, input().split())) for i in range(n)]
for i in range(n):
	n = C[i][0]
	d = C[i][1]
	x = int(d ** 0.5) - 1
	if x + -(-d // (x + 1)) <= n:
		print('YES')
	else:
		print('NO')


import sys
from sys import stdin, stdout
import bisect
import math
import heapq

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

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

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

def sin():
	return input()

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

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

def main():
	t = inin()
	for _ in range(t):
		(n, k) = cin()
		c = 1 + 4 * k
		c = math.sqrt(c)
		c -= 1
		ans = 'NO'
		c = c // 2
		if c + math.ceil(k / (c + 1)) <= n:
			ans = 'YES'
		elif c - 1 + math.ceil(k / c) <= n:
			ans = 'YES'
		elif c + 1 + math.ceil(k / (c + 2)) <= n:
			ans = 'YES'
		print(ans)
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()


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

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

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

def value():
	return tuple(map(int, input().split()))

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

def Int():
	return int(input())

def Str():
	return input()

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

def possible(x):
	k = ceil(d / (x + 1))
	return k + x <= n
for _ in range(Int()):
	(n, d) = value()
	low = 0
	high = n
	ok = False
	while low <= high:
		mid = (low + high) // 2
		if possible(mid):
			ok = True
			break
		else:
			high = mid - 1
	if ok:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	(n, k) = map(int, input().split())
	p = False
	if k <= n:
		p = True
	if p:
		print('YES')
		continue
	for i in range(1, n + 1):
		if i + math.ceil(k / (i + 1)) <= n:
			p = True
			break
	if p:
		print('YES')
	else:
		print('NO')


t = int(input())

def f(x):
	global k
	return (k + x) // (x + 1) + x
for i in range(t):
	(n, k) = [int(x) for x in input().strip().split()]
	if k <= n:
		print('YES')
	else:
		g = 0
		for j in range(n + 1):
			if f(j) <= n:
				print('YES')
				g = 1
				break
		if g == 0:
			print('NO')


from math import floor, sqrt, ceil
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	(newn, newd) = (n, d)
	flag = True
	if d <= n:
		print('YES')
		continue
	else:
		for x in range(1, floor(sqrt(d)) + 1):
			if x + ceil(d / (x + 1)) <= n:
				print('YES')
				flag = False
				break
		if flag:
			print('NO')


import math
x = list(map(int, input().split()))
n = []
d = []
for i in range(x[0]):
	n.append(list(map(int, input().split())))
for i in range(x[0]):
	d = n[i][1]
	x1 = math.floor(math.sqrt(d) - 1)
	n1 = x1 + math.ceil(d / (x1 + 1))
	x2 = math.ceil(math.sqrt(d) - 1)
	n2 = x2 + math.ceil(d / (x2 + 1))
	if n1 <= n[i][0] or n2 <= n[i][0]:
		print('YES')
	else:
		print('NO')


(n, d) = (0, 0)

def f(x):
	return x + d / (x + 1)

def g(x):
	return f(x) - f(x + 1)

def solv():
	(l, r) = (-1, n)
	while r - l > 1:
		m = (l + r) // 2
		if g(m) < 0:
			r = m
		else:
			l = m
	if r + (d - 1) // (r + 1) + 1 <= n:
		print('YES')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	solv()


from math import ceil, floor

def binsearch(n, d):
	x = (n - 1 + ((n - 1) ** 2 - 4 * (d - n)) ** 0.5) / 2
	if isinstance(x, complex):
		return False
	x = ceil(x)
	if x + ceil(d / (x + 1)) <= n or x - 1 + ceil(d / x) <= n:
		return True
	return False
T = int(input())
for _ in range(T):
	(n, d) = map(int, input().split())
	print('YES' if d <= n or binsearch(n, d) else 'NO')


n = int(input())
for i in range(n):
	(m, k) = map(int, input().split())
	t = 0
	for i in range(m):
		r = i + k / (i + 1)
		if r <= m:
			print('YES')
			t += 1
			break
	if t == 0:
		print('NO')


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	else:
		res = int(n / 2) + math.ceil(d / (int(n / 2) + 1))
		if res <= n:
			print('YES')
		else:
			print('NO')


import math

def fnc(x, d):
	return x + math.ceil(d / (x + 1))
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if (n + 1) ** 2 >= 4 * d:
		print('YES')
	else:
		print('NO')


import sys
import os
import time
import collections
from collections import Counter, deque
import itertools
import math
import timeit
import random

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)

def ddl():
	return collections.defaultdict(list)
t = ii()
for _ in range(t):
	(n, d) = mi()
	q = (n - 1) ** 2 / 4 + n - d
	print('YES') if q >= 0 else print('NO')


from math import ceil, sqrt
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	m = sqrt(d)
	if d <= n:
		print('YES')
	else:
		z = 2 * m - 1
		z = ceil(z)
		if z <= n:
			print('YES')
		else:
			print('NO')


from math import ceil
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	x = int(d ** 0.5) - 1
	print('NO' if all((x + ceil(d / (x + 1)) > n for x in (x, x + 1))) else 'YES')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	dis = math.pow(n - 1, 2) - 4 * (d - n)
	if dis < 0:
		print('NO')
	elif dis >= 0:
		print('YES')


t = int(input())
for i in range(t):
	(n, d) = list(map(int, input().split()))
	x = (n - 1) // 2
	f = -(x + 1) * (x - n)
	if f >= d:
		print('YES')
	else:
		print('NO')


import math
for x in range(int(input())):
	(h, m) = list(map(int, input().split()))
	k = int(math.sqrt(m))
	if k + math.ceil(m / (k + 1)) <= h:
		print('YES')
	elif k + 1 + math.ceil(m / (k + 2)) <= h:
		print('YES')
	elif k - 1 + math.ceil(m / k) <= h:
		print('YES')
	else:
		print('NO')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

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

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

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

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

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

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

def solve():
	(n, d) = sep()
	if d <= n:
		print('YES')
		return
	curr = d
	for i in range(1, n):
		if curr <= n:
			print('YES')
			return
		if ceil(d / i) > ceil(d / (i + 1)):
			curr = min(curr, ceil(d / (i + 1)) + i)
		else:
			break
	print('NO')
testcase(int(inp()))


from math import *
t = int(input())
while t:
	t -= 1
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	it = n
	i = 1
	flag = 0
	while i != n:
		if i + ceil(d / (i + 1)) <= n:
			flag = 1
			break
		i += 1
	if flag == 1:
		print('YES')
		continue
	print('NO')


import math

def check(d, n, x):
	return math.ceil(d / (x + 1)) + x <= n
T = int(input())
for _ in range(T):
	(n, d) = map(int, input().split())
	local_min = math.sqrt(d) - 1
	if check(d, n, math.floor(local_min)) or check(d, n, math.ceil(local_min)):
		print('YES')
		continue
	print('NO')


for _ in [0] * int(input()):
	(has, run_for) = [int(x) for x in input().split()]
	can_do = has // 2 + run_for / (has // 2 + 1)
	print(['NO', 'YES'][can_do <= has])


import math

def main():
	t = int(input())
	for _ in range(t):
		(n, d) = map(int, input().split())
		if n >= d:
			print('YES')
			continue
		r = int(math.sqrt(d))
		for i in range(1, r + 1):
			if i + math.ceil(d / (i + 1)) <= n:
				print('YES')
				break
		else:
			print('NO')
main()


import math
T = int(input())
for i in range(T):
	(n, d) = map(int, input().split())
	x = d ** 0.5 - 1
	x1 = math.ceil(x)
	x2 = math.floor(x)
	if x1 + math.ceil(d / (x1 + 1)) <= n or x2 + math.ceil(d / (x2 + 1)) <= n:
		print('YES')
	else:
		print('NO')


import sys, math
tc = int(sys.stdin.readline())
for _ in range(tc):
	(n, d) = map(int, sys.stdin.readline().split())
	if d <= n:
		print('YES')
	else:
		temp = int(d ** 0.5) - 1
		min_day = temp + math.ceil(d / (temp + 1))
		print('YES' if min_day <= n else 'NO')


import math
T = int(input())
while T:
	(n, d) = input().split()
	n = int(n)
	d = int(d)
	x0 = math.ceil((-1 + (1 + 4 * d) ** 0.5) / 2)
	x1 = x0 - 1
	if x0 >= 0:
		ans = x0 + math.ceil(d / (x0 + 1))
	if x1 >= 0:
		ans = min(ans, x1 + math.ceil(d / (x1 + 1)))
	if ans <= n:
		print('YES')
	else:
		print('NO')
	T -= 1


from math import *
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	ch = 0
	sq = int(sqrt(d))
	for i in range(sq + 1):
		c = -(-d / (i + 1)) + i
		if c <= n:
			ch = 1
			break
	if ch == 1:
		print('YES')
	else:
		print('NO')


import math
t = int(input())

def check(n, d):
	if d <= n:
		return 'YES'
	for i in range(1, n):
		a = math.ceil(d / (i + 1))
		if a + i <= n:
			return 'YES'
	else:
		return 'NO'
for _ in range(t):
	(n, d) = map(int, input().split())
	print(check(n, d))


from math import ceil
calc = lambda x, d: x + ceil(d / (x + 1))
for t in range(int(input())):
	(n, d) = map(int, input().split())
	if n < d:
		(x1, x2) = (n // 2, ceil(n / 2))
		if calc(x1, d) <= n or calc(x2, d) <= n:
			print('YES')
			continue
		print('NO')
		continue
	print('YES')


import math

def case():
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		return
	for i in range(1, n + 1):
		if i + math.ceil(d / (i + 1)) <= n:
			print('YES')
			return
	print('NO')
for _ in range(int(input())):
	case()


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

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

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

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

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

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

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

def Hash():
	return dict()

def Mod():
	return 1000000007

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

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

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

def Lcm(x, y):
	return x * y // gcd(x, y)

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

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

def solution():
	for _ in range(Int()):
		(n, d) = Mint()
		if n >= d:
			print('YES')
		else:
			x = n // 2
			if n >= x + ceil(d / (x + 1)):
				print('YES')
			else:
				print('NO')
solution()


from sys import stdin, stdout
cases = int(stdin.readline())
for i in range(cases):
	(n, d) = map(int, stdin.readline().split())
	if ((n + 1) / 2) ** 2 >= d:
		ans = 'YES'
	else:
		ans = 'NO'
	stdout.write(str(ans) + '\n')


import math
t = int(input())
for it in range(t):
	cout = 0
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		cout = 1
	else:
		i = 1
		tmp = i + math.ceil(d / (i + 1))
		while i + 1 + math.ceil(d / (i + 2)) <= tmp and i + 1 <= d:
			if tmp <= n:
				print('YES')
				cout = 1
				break
			i += 1
			tmp = i + math.ceil(d / (i + 1))
		if tmp <= n and (not cout):
			print('YES')
			cout = 1
	if not cout:
		print('NO')


import sys
from math import ceil

def solution(n, d):
	if d <= n:
		return 'YES'
	x = 1
	if n >= 100000.0:
		return 'YES'
	for x in range(0, n):
		if x + ceil(d / (x + 1)) <= n:
			return 'YES'
	return 'NO'
for line in sys.stdin:
	t = int(line)
	break
for line in sys.stdin:
	(n, d) = [int(x) for x in line.split()]
	print(solution(n, d))


flag = 0
t = int(input())
l = []
import math
for i in range(t):
	(x, y) = map(int, input().split())
	if x > y:
		l.append('YES')
	else:
		for j in range(x):
			if j + math.ceil(y / (j + 1)) <= x:
				l.append('YES')
				flag = 1
				break
		if flag == 0:
			l.append('NO')
		flag = 0
for i in l:
	print(i)


from math import ceil

def f(n, d):
	if d <= n:
		return 'YES'
	x = n
	while x != 0:
		opt = x + ceil(d / (x + 1))
		if opt <= n:
			return 'YES'
		else:
			x -= 1
	return 'NO'

def main():
	t = int(input())
	while t:
		(n, d) = map(int, input().split())
		print(f(n, d))
		t -= 1
main()


def check_root(n, d):
	return n * n + 2 * n + 1 >= 4 * d
t = int(input())
while t:
	t = t - 1
	(n, d) = map(int, input().split())
	if check_root(n, d):
		print('YES')
	else:
		print('NO')


import sys
from bisect import bisect_left as bl, bisect_right as br, bisect
import math
from itertools import zip_longest as zl
from itertools import groupby as gb
from itertools import combinations as comb
from itertools import combinations_with_replacement as cwr
from collections import defaultdict as dd
from collections import deque as dq
from collections import Counter as c
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return input()

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

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

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

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

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

def l2d(n, m, val=0):
	return [[val for i in range(n)] for j in range(m)]
for _ in range(int(data())):
	(n, d) = sp()
	if d <= n:
		print('YES')
	else:
		(t1, t2) = (n // 2, n // 2 + 1)
		(temp1, temp2) = (math.ceil(d / (t1 + 1)), math.ceil(d / (t2 + 1)))
		if temp1 + t1 <= n or temp2 + t2 <= n:
			print('YES')
		else:
			print('NO')


t = int(input())
from math import sqrt

def up(x):
	if x == int(x):
		return x
	else:
		return int(x) + 1
for iii in range(t):
	(n, d) = map(int, input().split())
	c = 0
	k = int(sqrt(d)) - 1
	li = [x + up(d / (1 + x)) for x in range(k, k + 2)]
	m = min(li)
	if m <= n:
		print('YES')
	else:
		print('NO')


import math

def m():
	for _ in range(int(input())):
		(n, d) = map(int, input().split())
		if d <= n:
			print('YES')
		else:
			f = True
			for i in range(1, n + 1):
				v = i + math.ceil(d / (i + 1))
				if v <= n:
					f = False
					print('YES')
					break
			if f:
				print('NO')
m()


import math
a = int(input())
f = 0
for i in range(a):
	b = list(map(int, input().split()))
	s = b[0]
	b = b[1]
	if s == b:
		print('YES')
		continue
	for j in range(1, s):
		if math.ceil(b / (j + 1)) + j <= s:
			print('YES')
			f = 1
			break
	if f != 1:
		print('NO')
	f = 0


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if n == 1:
		if d == 1:
			print('YES')
		else:
			print('NO')
	else:
		D = (n - 1) * (n - 1) - 4 * (d - n)
		if D >= 0:
			print('YES')
		else:
			print('NO')


import math
k = int(input())
for j in range(k):
	hello = list(map(int, input().split()))
	n = hello[0]
	d = hello[1]
	flag = False
	for i in range(n):
		if i + math.ceil(d / (i + 1)) <= n:
			print('Yes')
			flag = True
			break
	if not flag:
		print('NO')


import math
q = int(input())
for i in range(q):
	(n, d) = map(int, input().split())
	w = math.sqrt(d)
	if w != int(w):
		w = int(w) + 1
	else:
		w = int(w)
	if d % w == 0:
		k = d // w
	else:
		k = d // w + 1
	if n >= w - 1 + k:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	x = math.ceil(2.0 * math.sqrt(1.0 * d) - 1)
	if d <= n or x <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for j in range(0, t):
	(n, d) = map(int, input().split(' '))
	if d <= n:
		print('YES')
		continue
	else:
		pass
	g = d
	k = math.ceil(d / 2) + 1
	for i in range(1, g):
		h = math.ceil(d / (i + 1))
		gg = i + h
		if gg <= n:
			print('YES')
			break
		else:
			pass
		if k < gg:
			print('NO')
			break
		k = gg
	if i == g - 1:
		print('NO')


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	x1 = math.ceil(math.sqrt(d)) - 100000
	x2 = math.floor(math.sqrt(d)) + 100000
	if d <= n:
		print('YES')
	else:
		for i in range(max(x1, 0), x2 + 1):
			if i + math.ceil(d / (i + 1)) <= n:
				print('YES')
				break
		else:
			print('NO')


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

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

def solve(d):
	for i in range(int(sqrt(d)) + 1):
		ans = i + ceil(d / (i + 1))
		if ans <= n:
			return 'YES'
	return 'NO'
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	print(solve(d))


import math
t = int(input())
while t:
	t -= 1
	(n, d) = map(int, input().split())
	done = False
	for i in range(int(math.sqrt(d)) + 1):
		if i + math.ceil(d / (i + 1)) <= n:
			print('YES')
			done = True
			break
	if not done:
		print('NO')


import math
t = int(input())
for i in range(t):
	temp = list(input().split())
	n = int(temp[0])
	m = int(temp[1])
	if (n - 1) ** 2 >= 4 * (m - n):
		print('YES')
	else:
		print('NO')


from math import ceil
result = []
for m in range(int(input())):
	(n, d) = map(int, input().split())
	(x, y) = (0, 0)
	for o in range(n):
		if n >= x + ceil(d / (x + 1)):
			result.append('YES')
			y = 1
			break
		x += 1
	if y == 0:
		result.append('NO')
for a in result:
	print(a)


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	flag = 0
	if d <= n:
		print('YES')
	else:
		j = n
		while j >= 1:
			if j + math.ceil(d / (j + 1)) <= n:
				print('YES')
				flag = 1
				break
			j -= 1
		if flag == 0:
			print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = [int(i) for i in input().split()]
	k = math.floor(math.sqrt(d) - 1)
	g = math.ceil(math.sqrt(d) - 1)
	if math.ceil(d / (k + 1)) + k > n and math.ceil(d / (g + 1)) + g > n:
		print('NO')
	else:
		print('YES')


import math
times = int(input())

def days(target, required):
	if required <= target:
		print('YES')
	else:
		for j in range(1, int(target)):
			d1 = math.ceil(required / (j + 1))
			ans = j + d1
			if ans <= target:
				print('YES')
				return
		print('NO')
		return
for i in range(times):
	a = list(map(float, input().split()))
	(n, d) = (a[0], a[1])
	days(n, d)


from math import ceil, floor
t = int(input())
for i in range(t):
	(n, d) = tuple([int(x) for x in input().split(' ')])
	x = d ** 0.5 - 1
	if ceil(x) + ceil(d / (1 + ceil(x))) <= n or floor(x) + ceil(d / (1 + floor(x))) <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
b = False
for i in range(t):
	(a, b) = map(int, input().split())
	bs = math.ceil(b ** 0.5)
	temp = 0
	if a > bs:
		temp = bs
	for j in range(temp + 1):
		val = math.ceil(b / (j + 1))
		if val + j <= a:
			b = True
			break
	if b == True:
		print('YES')
	else:
		print('NO')


from math import ceil
nt = int(input())
for t in range(nt):
	(n, d) = map(int, input().split())
	x = 0
	prev = 0
	first = True
	possible = False
	while x < d:
		proposed = x + ceil(d / (x + 1))
		if proposed <= n:
			possible = True
			break
		if first:
			first = False
		elif proposed > prev:
			break
		prev = proposed
		x += 1
	if possible:
		print('YES')
	else:
		print('NO')


from math import ceil, sqrt, floor
N = int(input())
for _ in range(N):
	(n, d) = map(int, input().split())
	x = sqrt(d) - 1
	x1 = ceil(x)
	days = x1 + ceil(d / (x1 + 1))
	if days <= n:
		print('yes')
		continue
	print('no')


import sys
import math
import bisect
q = int(input())
while q:
	(n, d) = map(int, input().split())
	ch = 0
	if d <= n:
		ch = 1
	else:
		if n == 1:
			i = 1
		else:
			i = n // 2 - 1
		if n % 2 == 0:
			i = n // 2
		if i + math.ceil(d / (i + 1)) <= n:
			ch = 1
		i = i + 1
		if i + math.ceil(d / (i + 1)) <= n:
			ch = 1
	if ch == 1:
		print('YES')
	else:
		print('NO')
	q -= 1


import math

def main():
	T = int(input())
	outputs = []
	for i in range(T):
		(n, d) = input().split()
		(n, d) = (int(n), int(d))
		flag = False
		if n == d:
			flag = True
		elif d < n:
			flag = True
		else:
			mag = int(math.sqrt(d)) + 10
			for x in range(mag):
				limit = math.ceil(x + d / (x + 1))
				if limit <= n:
					flag = True
					break
		if flag:
			outputs.append('YES')
		else:
			outputs.append('NO')
	for i in outputs:
		print(i)
main()


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


from math import ceil, floor, sqrt
N = int(input())
for _ in range(N):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		x1 = floor(sqrt(d) - 1)
		x2 = ceil(sqrt(d) - 1)
		if x1 + ceil(d / (x1 + 1)) <= n or x2 + ceil(d / (x2 + 1)) <= n:
			print('YES')
		else:
			print('NO')


import math
T = int(input())
for _ in range(T):
	(n, d) = map(int, input().split())
	ans = 'NO'
	if d <= n:
		ans = 'YES'
	else:
		for x in range(1, n):
			if math.ceil(d / (x + 1)) + x <= n:
				ans = 'YES'
				break
	print(ans)


from math import ceil
T = int(input().strip())
for _ in range(T):
	(n, d) = map(int, input().strip().split())
	if n >= d:
		print('YES')
	elif n // 2 + ceil(d / (n // 2 + 1)) <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	found = 0
	for j in range(n):
		if j + math.ceil(d / (j + 1)) <= n:
			found = 1
			break
	if found:
		print('YES')
	else:
		print('NO')


from sys import stdin
import math

def inp():
	return stdin.readline().strip()
t = int(inp())
for _ in range(t):
	(n, d) = [int(x) for x in inp().split()]
	if d <= n:
		print('YES')
		continue
	else:
		c = 1
		for i in range(n // 2 + 2):
			if i + 1 + math.ceil(d / (i + 2)) <= n:
				print('YES')
				break
		else:
			print('NO')


import math
import sys
nn = sys.stdin.readline()
nn = int(nn)
i = 0
while i < nn:
	i = i + 1
	nline = sys.stdin.readline()
	nline = nline.strip()
	lst = nline.split()
	n = lst[0]
	n = int(n)
	d = lst[1]
	d = int(d)
	j = math.ceil(n / 2)
	k = 0
	klep = j + d
	if d <= n:
		print('YES')
		continue
	while j > 1:
		j = j - 1
		nd = math.ceil(d / (j + 1))
		nklep = j + nd
		if j + nd <= n:
			print('YES')
			k = 1
			break
		elif nklep <= klep:
			klep = nklep
		else:
			k = 0
			break
	if k == 0:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	tf = True
	for x in range(n + 1):
		if x + math.ceil(d / (x + 1)) <= n:
			print('YES')
			tf = False
			break
	if tf:
		print('NO')


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	res = False
	r = d ** 0.5
	for eps in range(-500, 501):
		x = int(max(0, r + eps))
		y = x + (d + x) // (x + 1)
		res |= y <= n
	print(['No', 'Yes'][res])


from math import sqrt, ceil
n = int(input())
for i in range(n):
	(n, d) = map(int, input().split())
	f = 0
	p = 0
	while p < sqrt(d):
		z = p + d / (p + 1)
		if z <= n:
			print('YES')
			f = 1
			break
		p += 1
	if f == 0:
		print('NO')


from math import ceil

def find():
	t = int(input())
	for __ in range(t):
		(n, m) = map(int, input().split())
		flag = False
		if m <= n:
			print('YES')
		else:
			for i in range(n, 0, -1):
				if i + ceil(m / (i + 1)) <= n:
					print('YES')
					flag = True
					break
			if not flag:
				print('NO')
find()


import math
for i in range(int(input())):
	(n, d) = map(int, input().split())
	count = 0
	if n == d:
		print('YES')
	else:
		for i in range(1, n + 1):
			s = i + math.ceil(d / (i + 1))
			if s <= n:
				count += 1
				break
		if count > 0:
			print('YES')
		else:
			print('NO')


from math import ceil
for sohol in range(int(input())):
	(n, d) = map(int, input().split())
	rslt = 1
	if d <= n:
		rslt = 0
	else:
		for x in range(1, n):
			if x + ceil(d / (x + 1)) <= n:
				rslt = 0
				break
	print(['YES', 'NO'][rslt])


from math import ceil, floor, sqrt

def days(d, x):
	return x + d / (x + 1)
n = int(input().strip())
for _ in range(n):
	(n, d) = list(map(int, input().split()))
	x1 = max(0, ceil(sqrt(d) - 1))
	x2 = max(0, floor(sqrt(d) - 1))
	if days(d, x1) > n and days(d, x2) > n:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	m = d
	for x in range(1, d):
		tmp = x + (d + x) // (x + 1)
		if tmp > m:
			break
		m = tmp
	if m <= n:
		print('YES')
	else:
		print('NO')


import sys
readline = sys.stdin.readline

def calc(x, d):
	return x - -d // x - 1
T = int(readline())
Ans = [None] * T
for qu in range(T):
	(N, D) = map(int, readline().split())
	res = D
	for i in range(1, int(D ** 0.5) + 4):
		res = min(res, calc(i, D), calc(max(1, -(-D // i)), D))
	if res <= N:
		Ans[qu] = 'YES'
	else:
		Ans[qu] = 'NO'
print('\n'.join(map(str, Ans)))


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	curr = 0
	currval = d
	while True:
		nex = math.ceil(d / (curr + 2))
		if nex < currval:
			currval = nex
			curr += 1
		else:
			break
	if curr + currval <= n:
		print('YES')
	else:
		print('NO')


import math

def deadline():
	cases = int(input())
	program = []
	for i in range(cases):
		program.append(list(map(int, input().split())))
	for i in range(len(program)):
		if program[i][1] <= program[i][0]:
			print('YES')
			continue
		L = 1
		R = program[i][0] - 1
		found = False
		while L <= R:
			mid = L + int((R - L) / 2)
			temp = program[i][0] - mid
			temp_opt = math.ceil(program[i][1] / (mid + 1))
			if temp >= temp_opt:
				print('YES')
				found = True
				break
			elif temp < temp_opt:
				L = mid + 1
			else:
				R = mid - 1
		if not found:
			print('NO')
deadline()


import math
import sys

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

def main():
	answer = ''
	for test in range(int(input())):
		(n, d) = listinput()
		x = 0
		broken = False
		while x * x <= d:
			if x + (d + x) // (x + 1) <= n:
				answer += 'YES \n'
				broken = True
				break
			x += 1
		if not broken:
			answer += 'NO \n'
	print(answer)
main()


def fun(a, b):
	if a % b != 0:
		return a // b + 1
	return a // b
for i in range(int(input())):
	(n, d) = [int(x) for x in input().split()]
	if d <= n:
		print('YES')
		continue
	h = True
	for j in range(1, n):
		if n - j >= fun(d, j + 1):
			print('YES')
			h = False
			break
	if h:
		print('NO')


import math
q = int(input())
for qq in range(q):
	(n, d) = map(int, input().split())
	(a, b) = (None, None)
	try:
		a = n - 1 + math.sqrt((n - 1) * (n - 1) - 4 * (d - n))
	except ValueError:
		pass
	try:
		b = n - 1 - math.sqrt((n - 1) * (n - 1) - 4 * (d - n))
	except ValueError:
		pass
	if a is not None or b is not None:
		print('YES')
	else:
		print('NO')


import math
x = int(input())
for _ in range(x):
	(n, m) = map(int, input().split())
	k = int(math.sqrt(m))
	z = k - 1 + math.ceil(m / k)
	if m <= n or z <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for k in range(t):
	(n, d) = list(map(int, input().split(' ')))
	if d <= n:
		print('Yes')
	else:
		f = 0
		for i in range(1, n + 1, 1):
			if i + math.ceil(d / (i + 1)) <= n:
				f = 1
				print('Yes')
				break
		if f == 0:
			print('No')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split(' '))
	if d <= n:
		print('YES')
	elif (n - 1) ** 2 + 4 * (n - d) < 0:
		print('NO')
	else:
		x = ((n - 1) ** 2 + 4 * (n - d)) ** 0.5
		x = (x + n - 1) // 2
		if x <= n - 1:
			print('YES')
		else:
			print('NO')


T = int(input())
for i in range(T):
	(n, d) = map(int, input().split())
	work = int(d ** 0.5) - 1
	if work + (d - 1) // (work + 1) + 1 > n:
		print('NO')
	else:
		print('YES')


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	low = 0
	high = n
	while low <= high:
		mid = (low + high) // 2
		if mid + math.ceil(d / (mid + 1)) > n:
			low = mid + 1
		else:
			high = mid - 1
	if low + math.ceil(d / (low + 1)) <= n:
		print('YES')
	else:
		print('NO')


from math import ceil, floor

def opt(a, b):
	return a + ceil(b / (a + 1))
T = int(input())
for _ in range(T):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		x1 = ceil(pow(d, 0.5) - 1)
		x2 = floor(pow(d, 0.5) - 1)
		if opt(x1, d) <= n or opt(x2, d) <= n:
			print('YES')
		else:
			print('NO')


import math
T = int(input())
for _ in range(T):
	(a, b) = map(int, input().split())
	if a >= b:
		print('YES')
		continue
	y = math.ceil(math.sqrt(b))
	ans = math.ceil(b / (y - 1)) + y - 2
	if math.ceil(b / y) + y - 1 < math.ceil(b / (y - 1)) + y - 2:
		ans = math.ceil(b / y) + y - 1
	if a >= ans:
		print('YES')
	else:
		print('NO')


import math
l = int(input())
for i in range(l):
	r = input()
	(n, d) = r.split(' ')
	if int(d) <= int(n):
		print('YES')
	else:
		x = int(n) // 2
		if x + math.ceil(int(d) / (x + 1)) <= int(n):
			print('YES')
		else:
			print('NO')


from math import *
T = int(input())
for loop in range(T):
	x = 0
	(n, d) = map(int, input().split(' '))
	possible = x <= n - ceil(d / (x + 1))
	while x <= n and (not possible):
		x = x + 1
		possible = x <= n - ceil(d / (x + 1))
	if possible:
		print('YES')
	else:
		print('NO')


from math import ceil
from math import sqrt
T = int(input())

def f(x):
	if x == 0:
		return int(10000000000.0)
	return x + ceil(d / x) - 1
while T:
	T -= 1
	(n, d) = map(int, input().split())
	a = int(sqrt(d))
	ans = min(f(a - 1), f(a), f(a + 1))
	print('YES' if ans <= n else 'NO')


t = int(input())
while t > 0:
	(n, d) = map(int, input().split())
	f = False
	if d <= n:
		f = True
	elif 4 * d <= (n + 1) * (n + 1):
		f = True
	if f:
		print('YES')
	else:
		print('NO')
	t = t - 1


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if n >= 100000:
		print('YES')
	else:
		for x in range(n):
			if x + (d + x) // (x + 1) <= n:
				print('YES')
				break
		else:
			print('NO')


import math

def fun(n, d):
	for x in range(1, n // 2 + 1):
		ans = math.ceil(d / (x + 1)) + x
		if ans <= n:
			return True
	return False
for _ in range(int(input())):
	(n, d) = list(map(int, input().split()))
	if d <= n:
		print('YES')
	elif fun(n, d):
		print('YES')
	else:
		print('NO')


from math import ceil
t = int(input())
for i in range(t):
	f = 0
	(n, d) = map(int, input().split())
	r = n
	l = 0
	while l < r:
		x = (l + r) // 2
		if x + ceil(d / (x + 1)) <= n:
			f = 1
			break
		elif x + d / (x + 1) > x + 1 + d / (x + 2):
			l = x + 1
		else:
			r = x - 1
	if l + ceil(d / (l + 1)) <= n:
		f = 1
	if f:
		print('YES')
	else:
		print('NO')


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
from math import ceil
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):
	(n, d) = multi_int_input()
	c = d
	i = 1
	flag = True
	while c > n:
		c = i + ceil(d / (i + 1))
		i += 1
		if i > n - 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


from math import ceil
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	flag = False
	for x in range(1, n):
		if x + ceil(d / (x + 1)) <= n:
			print('YES')
			flag = True
			break
	if not flag:
		print('NO')


import sys
import math
for _ in range(int(sys.stdin.readline())):
	[n, d] = sys.stdin.readline().strip().split(' ')
	x = int(n) // 2
	y = math.ceil(int(d) / (x + 1))
	if x + y <= int(n):
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = [int(x) for x in input().split()]
	m = 1000000000000000000
	f = 0
	for i in range(d):
		if i * i > d:
			break
		if i + math.ceil(d / (i + 1)) <= n:
			f = 1
			break
	if f == 1:
		print('YES')
	else:
		print('NO')


import math
for i in range(int(input())):
	t = [int(i) for i in input().split()]
	n = t[0]
	d = t[1]
	if d <= n:
		print('YES')
	else:
		s = round(math.sqrt(d) - 1)
		if s + math.ceil(d / (s + 1)) > n:
			print('NO')
		else:
			print('YES')


def rd(x):
	return int(x) if int(x) == x else int(x) + 1
t = int(input())
ans = []
for i in range(t):
	(n, d) = map(int, input().split())
	t = False if n < d else True
	for x in range(n):
		if x + rd(d / (x + 1)) <= n:
			t = True
			break
	ans.append('YES' if t else 'NO')
[print(i) for i in ans]


import math as m
f = lambda x, d: x + m.ceil(d / (x + 1))
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		(l, r) = (1, n - 1)
		while l <= r:
			mid = l + (r - l) // 2
			result = f(mid, d)
			if result == n:
				print('YES')
				break
			elif result > n:
				r = mid - 1
			else:
				l = mid + 1
		else:
			print('NO')


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans

def get(d, x):
	val = x
	c = d // (x + 1)
	if c * (x + 1) < d:
		c += 1
	return val + c
t = int(input())
for tt in range(t):
	(n, d) = map(int, sys.stdin.readline().split(' '))
	v = (n - 1) // 2
	v1 = v - 1
	v2 = v + 1
	if v1 < 0:
		v1 = v
	if v2 >= n:
		v2 -= 1
	if get(d, v) <= n:
		print('YES')
		continue
	if get(d, v1) <= n:
		print('YES')
		continue
	if get(d, v2) <= n:
		print('YES')
		continue
	print('NO')
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


def dead(n, d):
	if d <= n:
		return 'YES'
	for i in range(n):
		if d % (i + 1) == 0:
			x = d // (i + 1)
		else:
			x = d // (i + 1) + 1
		if x + i <= n:
			return 'YES'
	return 'NO'
l = []
t = int(input())
for i in range(t):
	(n, d) = input().split()
	l.append([int(n), int(d)])
for j in l:
	print(dead(j[0], j[1]))


import math
T = int(input())
for _ in range(T):
	(n, d) = map(int, input().split())
	lastDur = 10 ** 9
	found = False
	for i in range(n):
		dur = i + math.ceil(d / (i + 1))
		if dur <= n:
			found = True
			print('yes')
			break
		if dur > lastDur:
			found = True
			print('no')
			break
		lastDur = dur
	if found == False:
		print('no')


import math

def inp(dtype=str, strip=True):
	s = input()
	res = [dtype(p) for p in s.split()]
	res = res[0] if len(res) == 1 and strip else res
	return res

def problem1():
	t = inp(int)
	for _ in range(t):
		(n, d) = inp(int)
		res = False
		sq = math.floor(math.sqrt(d))
		for x in range(max(sq - 1000, 0), min(sq + 1000, n)):
			if x + math.ceil(d / (x + 1)) <= n:
				res = True
				break
		if res:
			print('YES')
		else:
			print('NO')

def problem2():
	pass

def problem3():
	pass

def problem4():
	pass

def problem5():
	pass

def problem6():
	pass

def __starting_point():
	problem1()
__starting_point()


T = int(input())
import math
for i in range(T):
	(n, d) = [int(x) for x in input().split()]
	if d <= 20:
		flag = False
		for h in range(0, d + 1):
			if h + math.ceil(d / (h + 1)) <= n:
				print('YES')
				flag = True
				break
		if not flag:
			print('NO')
	else:
		t = int(math.sqrt(d))
		flag = False
		for j in range(t - 3, t + 3):
			if j + math.ceil(d / (j + 1)) <= n:
				print('YES')
				flag = True
				break
		if not flag:
			if n == 1:
				if d == 1:
					print('YES')
				else:
					print('NO')
			else:
				print('NO')


import math as m
I = input
pr = print
for _ in range(int(I())):
	(n, d) = map(int, I().split())
	pr('YNEOS'[m.ceil(2 * m.sqrt(d)) - 1 > n::2])


from math import floor, sqrt, ceil
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	r = floor(sqrt(d))
	ch = 0
	for x in range(r + 1):
		if x + ceil(d / (x + 1)) <= n:
			ch = 1
			break
	if ch == 1:
		print('YES')
	else:
		print('NO')


import math

def main():
	T = int(input())
	list1 = []
	for i in range(T):
		x = 1
		c = 1
		(n, d) = map(int, input().split(' '))
		if n >= d:
			list1.append('YES')
		else:
			while n != x:
				w = x + math.ceil(d / (x + 1))
				if n >= w:
					list1.append('YES')
					break
				else:
					x += 1
				c += 1
			if c == n:
				list1.append('NO')
	for i in list1:
		print(str(i))
main()


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	flag = 0
	for j in range(n):
		inp = math.ceil(d / (j + 1))
		days = j + inp
		if days <= n:
			print('YES')
			flag = 1
			break
	if flag != 1:
		print('NO')


from math import ceil
for _ in range(int(input())):
	(deadline, runtime) = list(map(int, input().split()))
	optimisation_time = 0
	optimised_runtime = runtime
	while optimisation_time < optimised_runtime:
		optimised_runtime = ceil(runtime / (optimisation_time + 1))
		if optimised_runtime + optimisation_time <= deadline:
			print('YES')
			optimised_runtime = 'YES'
			break
		optimisation_time += 1
	if optimised_runtime != 'YES':
		print('NO')


def dead(n, d):
	if d <= n:
		return True
	else:
		d2 = d
		x = 0
		while x <= n:
			x += 1
			d2 = d / (x + 1)
			if d2 + x <= n:
				return True
		return False
size = int(input())
currentN = 0
currentD = 0
currentSTR = ''
current = []
temp = 0
for i in range(0, size):
	currentSTR = input()
	current = currentSTR.split()
	currentN = int(current[0])
	currentD = int(current[1])
	temp = dead(currentN, currentD)
	if temp:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for q in range(t):
	(n, d) = map(int, input().split())
	div1 = n // 2
	div2 = n // 2 + 1
	eqn1 = div1 + math.ceil(d / div2)
	if eqn1 <= n or d <= n:
		print('YES')
	else:
		print('NO')


import math

def func(x, d):
	return x + d / (x + 1)
T = int(input())
nn = []
dd = []
for i in range(T):
	tt = list(map(int, input().split(' ')))
	nn += [tt[0]]
	dd += [tt[1]]
for i in range(T):
	n = nn[i]
	d = dd[i]
	o = math.sqrt(d) - 1
	if func(o, d) > n:
		print('NO')
	elif func(int(o), d) <= n:
		print('YES')
	elif func(int(o + 0.9999999), d) <= n:
		print('YES')
	else:
		print('NO')
p = 1


import sys
import math
import collections
import heapq
input = sys.stdin.readline
t = int(input())
for w in range(t):
	(n, d) = (int(i) for i in input().split())
	le = 0
	ri = n
	c = 0
	while le < ri:
		mid = (le + ri) // 2
		if mid + math.ceil(d / (mid + 1)) <= n:
			c = 1
			break
		else:
			le = mid + 1
	if c == 1:
		print('YES')
	else:
		print('NO')


import math as ma
for i in ' ' * int(input()):
	(n, m) = map(int, input().split())
	if n >= m:
		print('YES')
	else:
		print(['YES', 'NO'][n // 2 + ma.ceil(m / (n // 2 + 1)) > n])


t = int(input())
for i in range(t):
	ch = input()
	L = [int(i) for i in ch.split()]
	n = L[0]
	d = L[1]
	if n >= d:
		print('YES')
	else:
		x = int(d ** 0.5) - 1
		y = x + 1
		if d % (x + 1) == 0:
			wx = x + d // (x + 1)
		else:
			wx = x + 1 + d // (x + 1)
		if d % (y + 1) == 0:
			wy = y + d // (y + 1)
		else:
			wy = y + 1 + d // (y + 1)
		if n >= wx or n >= wy:
			print('YES')
		else:
			print('NO')


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	a = n // 2
	c = math.ceil(d / (a + 1))
	c += a
	if c <= n:
		print('YES')
	else:
		print('NO')


import math

def ans(x, d):
	try:
		return x + math.ceil(d / (x + 1))
	except:
		return math.inf

def main():
	for _ in range(int(input())):
		(n, d) = list(map(int, input().split()))
		x = int(d ** 0.5)
		if d <= n:
			print('YES')
		elif min(ans(x, d), ans(x - 1, d), ans(x + 1, d)) <= n:
			print('YES')
		else:
			print('NO')
main()


def check(n, d):
	if (n // 2 + 1) * (n // 2 - n) + d <= 0:
		print('YES')
	else:
		print('NO')
t = int(input())
for x in range(t):
	(n, d) = map(int, input().split())
	check(n, d)


def power(x, y):
	res = 1
	while y > 0:
		if y & 1 == 1:
			res = res * x
		y = y >> 1
		x = x * x
	return res
import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	flag = 0
	i = 0
	if d <= n:
		print('YES')
	else:
		while i <= math.ceil(d / (i + 1)):
			if n >= i + math.ceil(d / (i + 1)):
				print('YES')
				flag = 1
				break
			i += 1
		if flag == 0:
			print('NO')


a = int(input())
import math
for i in range(a):
	(n, d) = map(int, input().split())
	k = 0
	if d <= n:
		print('YES')
	else:
		for x in range(n):
			if x + math.ceil(d / (x + 1)) <= n:
				k += 1
				print('YES')
				break
		if k == 0:
			print('NO')


from math import ceil
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	z = min(n, 10000)
	flag = 0
	if n >= d:
		print('YES')
		continue
	for x in range(1, n):
		if ceil(d / (x + 1)) <= n - x:
			print('YES')
			flag = 1
			break
	if flag == 0:
		print('NO')


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split(' '))
	if d <= n:
		print('YES')
	elif n / 2 == n // 2:
		if d // (n // 2 + 1) == d / (n // 2 + 1):
			if n - n // 2 >= d // (n // 2 + 1):
				print('YES')
			else:
				print('NO')
		elif n - n // 2 >= d // (n // 2 + 1) + 1:
			print('YES')
		else:
			print('NO')
	else:
		ans = 'NO'
		testnum1 = n // 2
		testnum2 = n // 2 + 1
		if d // (testnum1 + 1) == d / (testnum1 + 1):
			if n - testnum1 >= d // (testnum1 + 1):
				ans = 'YES'
		elif n - testnum1 >= d // (testnum1 + 1) + 1:
			ans = 'YES'
		if d // (testnum2 + 1) == d / (testnum2 + 1):
			if n - testnum2 >= d // (testnum2 + 1):
				ans = 'YES'
		elif n - testnum2 >= d // (testnum2 + 1) + 1:
			ans = 'YES'
		if ans == 'YES':
			print('YES')
		else:
			print('NO')


import math

def func(d, mid):
	return mid + math.ceil(d / (mid + 1))
for tt in range(int(input())):
	(n, d) = list(map(int, input().split()))
	if n >= d:
		print('YES')
		continue
	ans = d + 1
	for i in range(int(d ** 0.5 - 3), int(d ** 0.5 + 5)):
		if i >= 1 and i <= d:
			ans = min(ans, func(d, i))
	if n >= ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())

	def f(x):
		c = x + d // (x + 1)
		if d % (x + 1) == 0:
			return c
		else:
			return c + 1
	flag = 0
	l = 0
	h = n
	while l <= h:
		mid = (l + h) // 2
		if f(mid) <= n:
			flag = 1
			break
		else:
			h = mid - 1
	if flag == 1:
		print('YES')
	else:
		print('NO')


from math import ceil
t = int(input())
while t:
	(n, d) = map(int, input().split())
	D = (n - 1) ** 2 - 4 * (d - n)
	if D >= 0:
		print('YES')
	else:
		print('NO')
	t -= 1


from math import sqrt, floor, ceil
t = int(input())

def metric(x, d, n):
	return x + ceil(d / (x + 1)) <= n
for i in range(t):
	(n, d) = map(int, input().split(' '))
	D2 = (n + 1) ** 2 - 4 * d
	D1 = (n - 1) ** 2 - 4 - 4 * d
	if D2 >= D1:
		if D2 >= 0:
			b1 = (n - 1 - sqrt(D2)) / 2
			b2 = (n + 1 + sqrt(D2)) / 2
		else:
			print('NO')
			continue
		if D1 >= 0:
			a1 = (n - 1 - sqrt(D1)) / 2
			a2 = (n - 1 + sqrt(D1)) / 2
			if ceil(a1) - ceil(b1) > 0 or ceil(b2) - ceil(a2) >= 0 or ceil(b2) == b2:
				print('YES')
		elif ceil(b2) - ceil(b1) > 0 or ceil(b2) == b2:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


from math import *

def bsearch(d, n):
	low = 0
	high = n
	while low <= high:
		mid = low + (high - low) // 2
		val = mid + int(ceil(d / (mid + 1)))
		if val > n:
			high = mid - 1
		else:
			return True
	return False
for _ in range(int(input())):
	(n, d) = list(map(int, input().split()))
	if bsearch(d, n):
		print('YES')
	else:
		print('NO')


from math import sqrt
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	m = int(sqrt(d)) + 50
	ans = [x for x in range(m) if x + (d + x) // (x + 1) <= n]
	if len(ans) == 0:
		print('NO')
	else:
		print('YES')


from math import *
t = int(input())
while t > 0:
	(n, d) = [int(x) for x in input().split()]
	x1 = int(floor(sqrt(d + 1)))
	x2 = int(ceil(sqrt(d + 1)))
	x3 = int(floor((sqrt(4 * d + 1) - 1) / 2))
	x4 = int(ceil((sqrt(4 * d + 1) - 1) / 2))
	d1 = x1 + int(ceil(d / (x1 + 1)))
	d2 = x2 + int(ceil(d / (x2 + 1)))
	d3 = x3 + int(ceil(d / (x3 + 1)))
	d4 = x4 + int(ceil(d / (x4 + 1)))
	final = min(d1, d2)
	final = min(final, d3)
	final = min(final, d4)
	final = min(final, d)
	if final <= n:
		print('YES')
	else:
		print('NO')
	t -= 1


t = int(input())

def updiv(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1

def want(x):
	if x <= 0:
		return d
	return x + updiv(d, x + 1)

def want2(x):
	return x + d / (x + 1)
for i in range(t):
	(n, d) = map(int, input().split())
	l = 0
	r = d
	while r - l > 1:
		m1 = (l * 2 + r) / 3
		m2 = (l + r * 2) / 3
		a1 = want2(m1)
		a2 = want2(m2)
		if a1 <= a2:
			r = m2
		else:
			l = m1
	ans = float('inf')
	l = int(l)
	r = int(r)
	for i in range(50):
		i = l - 25 + i
		ans = min(ans, want(i))
	if ans <= n:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	A = [int(i) for i in input().split()]
	n = A[0]
	d = A[1]
	x1 = 0
	x2 = 0
	discr = (n - 1) ** 2 - 4 * (d - n)
	if discr < 0:
		print('NO')
	elif d <= n:
		print('YES')
	else:
		x1 = round((n - 1 + math.sqrt(discr)) / 2)
		x2 = round((n - 1 - math.sqrt(discr)) / 2)
		if x1 == x2 and x1 > 0:
			if x1 + round(d / (x1 + 1)) <= n:
				print('YES')
			else:
				print('NO')
		elif x1 == 0 and x2 > 0 or (x2 == 0 and x1 > 0):
			if max(x1, x2) + round(d / (max(x1, x2) + 1)) <= n:
				print('YES')
			else:
				print('NO')
		else:
			res = 0
			for x in range(min(x1, x2), max(x1, x2)):
				if x > 0 and x + round(d / (x + 1)) <= n:
					res = 1
					break
			if res == 1:
				print('YES')
			else:
				print('NO')


from math import ceil
t = int(input())
for _ in range(t):
	(n, d) = input().split()
	n = int(n)
	d = int(d)
	if d <= n:
		print('YES')
	else:
		found = False
		for x in range(1, n):
			if x + ceil(d / (x + 1)) <= n:
				found = True
				print('YES')
				break
		if not found:
			print('NO')


import math
t = int(input())
for q in range(t):
	(n, d) = [int(i) for i in input().split()]
	if n >= d:
		print('YES')
	else:
		x = 0
		bol = False
		while x * x <= d:
			if x + math.ceil(d / (x + 1)) <= n:
				print('YES')
				bol = True
				break
			x += 1
		if not bol:
			print('NO')


def f(x, d):
	if d % (x + 1) == 0:
		return x + d // (x + 1)
	return x + d // (x + 1) + 1
t = int(input())
for _ in [0] * t:
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		judge = False
		for x in range(40000):
			if f(x, d) <= n:
				judge = True
				break
		if judge:
			print('YES')
		else:
			print('NO')


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():
	(n, d) = Read.list_int()
	if d <= n:
		print('YES')
	else:
		for i in range(math.ceil(math.sqrt(d))):
			r = i + math.ceil(d / (i + 1))
			if r <= n:
				print('YES')
				return
		print('NO')
query_count = Read.int()
while query_count:
	query_count -= 1
	solve()


import math
t = int(input())
data_set = []
for i in range(t):
	data_set.append(list(map(int, input().split(' '))))
for i in range(t):
	data = data_set[i]
	(n, d) = data
	solved = False
	if d <= n:
		print('YES')
		continue
	for x in range(n, 0, -1):
		total_time = x + (d + x) // (x + 1)
		if total_time <= n:
			print('YES')
			solved = True
			break
	if not solved:
		print('NO')


import math
for _ in range(int(input())):
	flag = False
	(n, d) = map(int, input().split())
	f = n // 2
	if d <= n:
		print('YES')
	elif f + math.ceil(d / (f + 1)) <= n or f + 1 + math.ceil(d / (f + 2)) <= n:
		print('YES')
	else:
		print('NO')


def test(x, d, n):
	temp = d / (x + 1)
	if int(temp) != temp:
		temp = int(temp) + 1
	if temp + x <= n:
		return True
	else:
		return False
n = int(input())
for i in range(n):
	raw = input().split()
	[n, d] = [int(x) for x in raw]
	a1 = test(int(d ** 0.5) - 1, d, n) or test(int(d ** 0.5), d, n)
	if a1 == True:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
while t:
	t -= 1
	(n, d) = map(int, input().split())
	l = 0
	h = n
	flag = 0
	while l <= h:
		res = l + (h - l) // 2
		if n - res >= math.ceil(d / (res + 1)):
			flag = 1
			break
		else:
			h = res - 1
	if flag == 1:
		print('YES')
	else:
		print('NO')


import math

def binarySearch(l, r, n, d):
	while l <= r:
		mid = l + (r - l) // 2
		if mid + math.ceil(d / (mid + 1)) <= n:
			return 'YES'
		elif mid + math.ceil(d / (mid + 1)) > n:
			l = mid + 1
		else:
			r = mid - 1
	return 'NO'
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		print(binarySearch(0, n - 1, n, d))


import math

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()):
	(n, d) = cin()
	s = int(math.sqrt(d))
	k = s - 1 + math.ceil(d / s)
	if d <= n or k <= n:
		print('YES')
	else:
		print('NO')


from math import ceil
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	x = int(ceil(d ** 0.5))
	if d <= n:
		print('YES')
		continue
	flag = 0
	for i in range(1, x + 1):
		if i + int(ceil(d / (i + 1))) <= n:
			print('YES')
			flag = 1
			break
	if flag == 0:
		print('NO')


import os
import sys
from atexit import register
from io import StringIO
sys.stdout = StringIO()
register(lambda : os.write(1, sys.stdout.getvalue().encode()))
import math
T = int(input())
for _ in range(T):
	(n, d) = [int(k) for k in input().split()]
	x = math.floor(math.sqrt(d) - 1)
	if min(x + math.ceil(d / (x + 1)), x + 1 + math.ceil(d / (x + 2))) <= n:
		print('YES')
	else:
		print('NO')


import math

def optimize(start, end, d, n):
	if start > end:
		return 0
	else:
		mid = (end + start) // 2
		ans = math.ceil(d / (mid + 1))
		if ans + mid <= n:
			return 1
		elif ans + mid > n:
			return optimize(mid + 1, end, d, n)

def deadline(n, d):
	if d <= n:
		return 'YES'
	elif optimize(0, n, d, n) == 0:
		return 'NO'
	else:
		return 'YES'
t = int(input())
for x in range(t):
	(n, d) = list(map(int, input().split()))
	print(deadline(n, d))


a = int(input())
ans = []
for i in range(a):
	(n, d) = map(int, input().split())
	x = 0
	while x * x + x - n * x - n + d > 0:
		x += 1
		if x > n:
			x = -1
			break
	if x >= 0:
		ans.append('YES')
	else:
		ans.append('NO')
for i in range(a):
	print(ans[i])


import math
n = int(input())
for t in range(n):
	sc = list(map(int, input().split()))
	cont = 1
	flag = 0
	if sc[0] >= sc[1]:
		print('YES')
	else:
		flag = 1
		while sc[0] > 1:
			cont += 1
			sc[0] -= 1
			if math.ceil(sc[1] / cont) <= sc[0]:
				print('YES')
				flag = 0
				break
			if cont - 1 > sc[0]:
				break
	if flag == 1:
		print('NO')


import sys, math, cmath
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().split())
t = 1
t = inp()
for tt in range(t):
	(n, d) = invr()
	a = 1
	b = 2
	c = 1 - d
	dw = b ** 2 - 4 * a * c
	sol1 = (-b - cmath.sqrt(dw)) / (2 * a)
	sol2 = (-b + cmath.sqrt(dw)) / (2 * a)
	q = 100000000000000000000000
	w = 100000000000000000000000
	if sol1.imag == 0 and sol1.real >= 0:
		q = sol1.real
	if sol2.imag == 0 and sol2.real >= 0:
		w = sol2.real
		q = min(q, w)
	w = min(math.floor(q) + math.ceil(d / (math.floor(q) + 1)), math.ceil(q) + math.ceil(d / (math.ceil(q) + 1)))
	if w <= n or d <= n:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	x = input()
	(n, d) = (int(x.split(' ')[0]), int(x.split(' ')[1]))
	res = (n + 1) * (n + 1) - 4 * d
	if res >= 0:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, d) = input().split()
	n = int(n)
	d = int(d)
	flag = 0
	for i in range(n):
		s = i + d / (1 + i)
		if s <= n:
			flag = 1
			break
		else:
			continue
	if flag == 0:
		print('NO')
	else:
		print('YES')


from math import ceil
ans = []
for i in range(int(input())):
	(n, d) = [int(i) for i in input().split()]
	possible = False
	for i in range(1, int(d ** 0.5) + 1):
		x = i - 1
		if x + ceil(d / i) <= n:
			possible = True
			break
	if possible:
		ans.append('YES')
	else:
		ans.append('NO')
print('\n'.join(ans))


class Solve:
	n = d = 0

	def bsearch(self, l, r):
		if l > r:
			return 'NO'
		mid = (l + r) // 2
		xdiv = self.d // (mid + 1) + (1 if self.d % (mid + 1) else 0)
		if mid + xdiv <= self.n:
			return 'YES'
		elif mid >= xdiv:
			return self.bsearch(l, mid - 1)
		else:
			return self.bsearch(mid + 1, r)

	def solve(self):
		if self.d <= self.n:
			return 'YES'
		return self.bsearch(1, self.n)

def main():
	for _ in [0] * int(input()):
		s = Solve()
		(s.n, s.d) = map(int, input().split())
		print(s.solve())
main()


import math

def main():
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		return
	for x in range(1, n):
		m = x + math.ceil(d / (x + 1))
		if m <= n:
			print('YES')
			return
	print('NO')
for _ in range(int(input())):
	main()


from math import sqrt, ceil
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	s = int(sqrt(d))
	if s + ceil(d / (s + 1)) <= n or s - 1 + ceil(d / s) <= n or s + 1 + ceil(d / (s + 2)) <= n:
		print('YES')
	else:
		print('NO')


from math import ceil
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		flag = 'NO'
		for i in range(0, int(pow(d, 0.5)) + 2):
			if ceil(d / (i + 1) + i) <= n:
				flag = 'YES'
		print(flag)


from sys import stdin, stdout

def compute(x, d):
	return x + d // (x + 1) + (d % (x + 1) > 0)

def check(n, d):
	(i, j) = (0, n - 1)
	if compute(i, d) <= n or compute(j, d) <= n:
		return True
	(p1, p2) = (i + d / (i + 1), j + d / (j + 1))
	while i < j:
		if j - i <= 3:
			for x in range(i + 1, j):
				if compute(x, d) <= n:
					return True
			return False
		_s = (j - i) // 3
		(x, y) = (i + _s, j - _s)
		if compute(x, d) <= n or compute(y, d) <= n:
			return True
		(p3, p4) = (x + d / (x + 1), y + d / (y + 1))
		if p1 > p2:
			if p3 > p2 and p4 > p2:
				return False
			if p3 > p4:
				(i, p1) = (x, p3)
			else:
				(j, p2) = (y, p4)
		else:
			if p3 > p1 and p4 > p1:
				return False
			if p3 > p4:
				(i, p1) = (x, p3)
			else:
				(j, p2) = (y, p4)
	return False
t = int(stdin.readline().strip())
for _ in range(t):
	(n, d) = map(int, stdin.readline().split())
	if check(n, d):
		stdout.write('YES\n')
	else:
		stdout.write('NO\n')


import sys
import math
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	ans = 0
	if n % 2 == 0:
		ans = n // 2 - 1
	else:
		ans = n // 2
	ans = ans + math.ceil(d / (ans + 1))
	if ans <= n:
		print('YES')
	else:
		print('NO')


t = int(input())

def up(x):
	if x > x // 1:
		x = x // 1 + 1
	return x
for i in range(t):
	a = str(input()).split(' ')
	n = int(a[0])
	d = int(a[1])
	x = 0
	for i in range(n // 2 + 1):
		r = x + up(d / (x + 1))
		if n >= r:
			print('YES')
			break
		x += 1
	else:
		print('NO')


import math

def deadline(n, d):
	for i in range(n):
		a = math.ceil(d / (i + 1))
		if a + i <= n:
			return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	(n, d) = map(int, input().strip().split())
	print(deadline(n, d))


import sys, math
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	i = 1
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		while i < n:
			if i + math.ceil(d / (i + 1)) <= n:
				print('YES')
				break
			else:
				i += 1
		if i == n:
			print('NO')


import math

def solve(n, d):
	ans = 0
	for x in range(0, 10 ** 5):
		tmp = x + math.ceil(d / (x + 1))
		if tmp <= n:
			ans = 1
	print(['YES', 'NO'][1 - ans])
t = int(input())
for _ in range(t):
	solve(*map(int, input().split()))


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	elif n // 2 + d / (n // 2 + 1) <= n:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		x = int(math.ceil(d ** 0.5)) - 1
		y = int(math.floor(d ** 0.5)) - 1
		if x == 0:
			x += 1
		if y == 0:
			y += 1
		temp1 = x + int(math.ceil(d / (x + 1)))
		temp2 = y + int(math.ceil(d / (y + 1)))
		if temp1 <= n or temp2 <= n:
			print('YES')
		else:
			print('NO')


T = int(input())

def z(n, d):
	for x in range(n + 1):
		if x + (d + x) // (x + 1) <= n:
			print('YES')
			return
	print('NO')
	return
for _ in range(T):
	(t1, t2) = map(int, input().split())
	z(t1, t2)


import sys
import math

def ceil(a, b):
	return -(-a // b)

def answer(n, d):
	sqrtd = int(math.sqrt(d))
	if ceil(d, sqrtd) + (sqrtd - 1) <= n:
		return 'YES'
	else:
		return 'NO'
	return

def main():
	T = int(input())
	while T:
		(n, d) = [int(i) for i in sys.stdin.readline().split()]
		print(answer(n, d))
		T -= 1
	return
main()


from math import ceil
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		x = 1
		while x * x < d:
			if x + ceil(d / (x + 1)) <= n:
				print('YES')
				break
			x += 1
		else:
			print('NO')


def can_do(n, d):
	D = 1 + 2 * n + n ** 2 - 4 * d
	return D >= 0

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


import math

def f(x: int, d: int) -> int:
	return x + math.ceil(d / (x + 1))
t = int(input())
for tt in range(0, t):
	(n, d) = map(int, input().split())
	l = int(0)
	r = int(d)
	ok = int(0)
	for i in range(0, int(math.ceil(math.sqrt(d)))):
		if f(i, d) <= n:
			ok = 1
			break
	if ok:
		print('YES')
		continue
	else:
		print('NO')


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

def solve():
	(n, d) = list(map(int, input().split()))
	ans = False
	if d <= n:
		ans = True
	for i in range(-20, 21):
		x = (n - 1) // 2 + i
		if x > 0:
			if x + ceil(d / (x + 1)) <= n:
				ans = True
	if ans:
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	solve()


from math import ceil
for n in range(int(input())):
	(x, y) = map(int, input().split())
	if x >= y:
		print('YES')
	else:
		p = x // 2
		q = p + ceil(y / (p + 1))
		if q <= x:
			print('YES')
		else:
			print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = list(map(int, input().strip().split()))
	b = 1 - n
	c = d - n
	if b ** 2 - 4 * c >= 0:
		if -b + math.sqrt(b ** 2 - 4 * c) >= 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


from sys import stdin
import math
t = int(stdin.readline().rstrip())
while t > 0:
	(n, d) = map(int, stdin.readline().split())
	p = n // 2
	q = n
	q -= p
	q *= p + 1
	if d <= q:
		print('YES')
	else:
		print('NO')
	t -= 1


from math import ceil
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	a = [0] * 6
	a[0] = int(d ** (1 / 2)) - 1
	a[1] = int(d ** (1 / 2) - 2)
	a[2] = int(d ** (1 / 2))
	a[3] = int(d ** (1 / 2) + 1)
	a[4] = int(d ** (1 / 2) + 2)
	a[5] = 0
	flag = False
	for j in range(6):
		if a[j] >= 0:
			time = a[j] + ceil(d / (a[j] + 1))
			if time <= n:
				flag = True
	if flag:
		print('YES')
	else:
		print('NO')


import math

def optimize(n, d):
	if d <= n:
		return 'YES'
	for x in range(1, n):
		temp = x + math.ceil(d / (x + 1))
		if temp <= n:
			return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	print(optimize(n, d))


import math
a = int(input())
for i in range(a):
	(n, d) = map(int, input().split())
	flag = 0
	if d <= n:
		print('YES')
		flag = 1
	elif n * n + 2 * n + 1 - 4 * d >= 0:
		r1 = (n - 1 + int(math.sqrt(n * n + 2 * n + 1 - 4 * d))) // 2
		r2 = (n - 1 - int(math.sqrt(n * n + 2 * n + 1 - 4 * d))) // 2
		ans = []
		ans.append(r1)
		ans.append(r2)
		ans.append(r1 + 1)
		ans.append(r1 + 2)
		ans.append(r1 - 1)
		ans.append(r1 - 2)
		ans.append(r2 + 1)
		ans.append(r2 + 2)
		ans.append(r2 - 1)
		ans.append(r2 - 2)
		for i in range(len(ans)):
			if ans[i] >= 0:
				if ans[i] + math.ceil(d / (ans[i] + 1)) <= n:
					print('YES')
					flag = 1
					break
	elif flag == 0:
		print('NO')


import math
for i in range(0, int(input())):
	(n, d) = map(int, input().split())
	x = int(pow(d, 0.5)) - 1
	if (d <= n) | (math.ceil(x + d / (x + 1)) <= n):
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		temp = math.ceil(n / 2)
		for x in range(1, temp + 1):
			res = x + math.ceil(d / (x + 1))
			if res <= n:
				print('YES')
				break
		else:
			print('NO')


for i in range(int(input())):
	(n, d) = [int(i) for i in input().split()]
	p = d ** 0.5
	if p == int(p):
		p = int(p)
		w = 2 * p - 1
		if w <= n:
			print('YES')
		else:
			print('NO')
	else:
		x1 = int(p)
		x2 = x1 + 1
		p1 = x1 + d / (x1 + 1)
		p2 = x2 + d / (x2 + 1)
		p = min(p1, p2)
		if p > n:
			print('NO')
		else:
			print('YES')


INF = 10 ** 10

def main():
	(n, d) = get_list()
	mini = d
	for x in range(1, d):
		rs = (d + x) // (x + 1) + x
		if rs <= mini:
			mini = rs
		else:
			break
	if mini <= n:
		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()))]


from sys import stdin
import math
input = stdin.readline
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	k = (n - 1) ** 2 + 4 * n - 4 * d
	if k < 0:
		print('NO')
	else:
		print('YES')


import math
y = int(input())
for t in range(y):
	l = list(map(int, input().split()))
	n = l[0]
	d = l[1]
	if d <= n:
		print('YES')
	else:
		x = int(n / 2)
		j = d / (x + 1)
		g = x + math.ceil(j)
		if g <= n:
			print('YES')
		else:
			print('NO')


s = int(input())
for _ in range(s):
	import math
	l = list(map(int, input().split()))
	n = l[0]
	d = l[1]
	if d <= n:
		print('YES')
	else:
		k = math.ceil(math.sqrt(d))
		p = math.ceil(d / k) + k - 1
		if p <= n:
			print('YES')
		else:
			print('NO')


import math
for _ in range(int(input())):
	(n, d) = list(map(int, input().split()))
	if d <= n:
		print('YES')
		continue
	c = 0
	res = d + 1
	while c < n and res > n:
		c += 1
		res = c + math.ceil(d / (c + 1))
	print('NO' if c == n else 'YES')


import math
t = int(input())
while t > 0:
	t -= 1
	nd = input().split()
	n = int(nd[0])
	d = int(nd[1])
	if d <= n:
		print('YES')
	else:
		f = False
		for i in range(1, n):
			s = math.ceil(d / (i + 1)) + i
			if s <= n:
				f = True
				break
		if f == True:
			print('YES')
		else:
			print('NO')


t = int(input())
while t:
	t -= 1
	(n, d) = map(int, input().split())
	ok = False
	for i in range(n):
		if i + (d + i) // (i + 1) <= n:
			print('YES')
			ok = True
			break
	if not ok:
		print('NO')


import math
k = int(input())
for z in range(k):
	arr = [int(i) for i in input().split()]
	(n, d) = (arr[0], arr[1])
	flag = False
	if d <= n:
		print('YES')
		continue
	for i in range(1, n + 1):
		if i + math.ceil(d / (i + 1)) <= n:
			print('YES')
			flag = True
			break
	if flag == False:
		print('NO')


import math
d = int(input())
for i in range(0, d):
	(x, y) = [int(a) for a in input().split()]
	s = 0
	if y <= x:
		print('YES')
	else:
		for j in range(1, x):
			n = y / (j + 1)
			f = math.ceil(n)
			f = f + j
			if f <= x:
				s = s + 1
				break
		if s == 0:
			print('NO')
		else:
			print('YES')


import math
T = int(input())
for iT in range(T):
	(n, d) = [int(i) for i in input().split()]
	x = int(math.sqrt(d)) - 1
	temp = x + math.ceil(d / (x + 1))
	print('YES' if temp <= n or d == 1 else 'NO')


def num():
	return int(input())

def line():
	return map(int, input().split())
from itertools import repeat
T = num()
for _ in repeat(None, T):
	(n, d) = line()
	print('YES' if n ** 2 + 2 * n - 4 * d + 1 >= 0 else 'NO')


import math
a = int(input())
for i in range(0, a):
	b = list(map(int, input().split()))
	if b[0] >= b[1]:
		print('YES')
	else:
		for j in range(1, math.ceil(b[1] ** 0.5 - 1) + 1):
			if math.ceil(j + b[1] / (j + 1)) <= b[0]:
				print('YES')
				break
		else:
			print('NO')


def f(d, n):
	x = d // 2
	return x + n // (x + 1) + (n % (x + 1) > 0) <= d
for i in range(int(input())):
	(d, n) = map(int, input().split())
	if f(d, n):
		print('YES')
	else:
		print('NO')


exec(int(input()) * "n,d=map(int,input().split());print('YNEOS'[4*d>(n+1)**2::2]);")


import math
a = int(input())
for i in range(a):
	l = input().split()
	if l[0] == l[1]:
		print('YES')
	else:
		n = int(l[0])
		d = int(l[1])
		if n > d:
			print('YES')
		else:
			o = False
			for j in range(1, n):
				r = j + math.ceil(d / (j + 1))
				if r <= n:
					o = True
					break
			if o:
				print('YES')
			else:
				print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().strip().split())
	optimal_x = math.ceil(math.sqrt(d)) - 1
	optimal_time = optimal_x + math.ceil(d / (optimal_x + 1))
	if optimal_time <= n:
		print('YES')
	else:
		print('NO')


from math import ceil
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	found = False
	cur = 0
	for i in range(int(max(n, d) ** 0.5) + 69):
		x = i
		if x + ceil(d / (x + 1)) <= n:
			found = True
			break
		x = n - i
		if x >= 0 and x + ceil(d / (x + 1)) <= n:
			found = True
			break
	print('YES' if found else 'NO')


from math import ceil
T = int(input())
for i in range(T):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		for i1 in range(n):
			if i1 + ceil(d / (i1 + 1)) <= n:
				print('YES')
				break
		else:
			print('NO')


import math
m = int(input())
for i in range(0, m):
	(n, d) = map(int, input().split(' '))
	if d <= n:
		print('YES')
	else:
		flag = 0
		for i in range(1, n // 2 + 1):
			aa = i + math.ceil(d / (i + 1))
			if aa <= n:
				print('YES')
				flag = 1
				break
		if flag == 0:
			print('NO')


import math
for _ in range(int(input())):
	(n, d) = (int(x) for x in input().strip().split())
	if d <= n:
		print('YES')
		continue
	t = 0
	f = False
	for i in range(1, n):
		t = math.ceil(d / (i + 1))
		if i + t <= n:
			f = True
			print('YES')
			break
	if not f:
		print('NO')


from math import ceil
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	prev = 0
	x = 0
	while True:
		test = ceil(d / (x + 1))
		if test == prev:
			print('NO')
			break
		test2 = n - x
		if test <= test2:
			print('YES')
			break
		prev = test
		x += 1


import math
t = int(input())
for i in range(0, t):
	(n, d) = input().split()
	n = int(n)
	d = int(d)
	if n >= d:
		print('Yes')
	else:
		nd = 0
		for i in range(1, n, 1):
			if i + math.ceil(d / (i + 1)) <= n:
				print('Yes')
				nd = 1
				break
		if nd == 0:
			print('No')


import math
t = int(input())
for tc in range(t):
	(n, d) = [int(x) for x in input().split()]
	value = d
	j = 1
	prev = value
	while value > n:
		value = j + math.ceil(d / (j + 1))
		if value > prev:
			value = prev
			break
		else:
			prev = value
		j += 1
	if value <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	x = input().split()
	x = [int(i) for i in x]
	n = x[0]
	d = x[1]
	if d <= n:
		print('YES')
	else:
		q = (n - 1) ** 2 - 4 * (d - n)
		if q < 0:
			print('NO')
		else:
			U = (n - 1 + q ** 0.5) / 2
			L = (n - 1 - q ** 0.5) / 2
			if U >= 0:
				if int(U) + int(math.ceil(d / (int(U) + 1))) <= n:
					print('YES')
				elif L >= 0 and int(L) + int(math.ceil(d / (int(L) + 1))) <= n:
					print('YES')
				elif int((L + U) / 2) >= 0 and int((L + U) / 2) + int(math.ceil(d / (int((L + U) / 2) + 1))) <= n:
					print('YES')
				else:
					print('NO')
			else:
				print('NO')


from math import *
T = int(input())
for kase in range(T):
	(n, d) = [int(x) for x in input().split()]
	m = ceil(sqrt(d))
	(l, r) = (m - 10, m + 10)
	l = max(0, l)
	ans = 1e+100
	for x in range(l, r):
		ans = min(ans, x + ceil(d / (x + 1)))
	if ans <= n:
		print('YES')
	else:
		print('NO')


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

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

def solve():
	(n, d) = map(int, input().split())
	if (n + 1) ** 2 >= 4 * d:
		print('YES')
	else:
		print('NO')
tt = 1
tt = int(input())
for __ in range(tt):
	solve()


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if math.floor(math.sqrt(d) - 1) + math.ceil(d / (math.floor(math.sqrt(d) - 1) + 1)) <= n or math.ceil(math.sqrt(d) - 1) + math.ceil(d / (math.ceil(math.sqrt(d) - 1) + 1)) <= n:
		print('YES')
		continue
	else:
		print('NO')


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		a = 1
		b = 1 - n
		c = d - n
		d = b * b - 4 * a * c
		if d < 0:
			print('NO')
		else:
			j = math.ceil((-b + math.sqrt(d)) / (2 * a))
			k = (-b - math.sqrt(d)) / (2 * a)
			if j > 0 and j < n or (k > 0 and k < n):
				print('YES')
			else:
				print('NO')


import math
n = int(input())
a = []
for i in range(n):
	(b, c) = input().split()
	a.append([int(b), int(c)])
for i in a:
	if i[1] <= i[0]:
		print('YES')
	else:
		t = math.floor(pow(i[1], 0.5)) - 1
		if t + math.ceil(i[1] / (t + 1)) <= i[0]:
			print('YES')
		else:
			print('NO')


import math

def comp():
	q = int(input())
	l = []
	for i in range(q):
		(n, d) = map(int, input().split())
		if n >= d:
			l.append('YES')
		else:
			for x in range(1, n):
				if n >= math.ceil(d / (x + 1)) + x:
					l.append('YES')
					break
			else:
				l.append('NO')
	for i in range(q):
		print(l[i])
comp()


__author__ = 'tanunia'
import math

def solve_eq(n, d):
	disc = (1 - n) * (1 - n) - 4 * (d - n)
	if disc == 0:
		x = (n - 1) / 2
		if x <= n and x >= 0 and x.is_integer():
			print('YES')
		else:
			print('NO')
	elif disc > 0:
		(x1, x2) = (math.floor((n - 1 + math.sqrt(disc)) / 2), math.ceil((n - 1 - math.sqrt(disc)) / 2))
		if x1 >= 0 and x1 <= n or (x2 >= 0 and x2 <= n):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	solve_eq(n, d)


import sys
import math

def check(l, r, n, d):
	if l > r:
		return False
	mid = (l + r) // 2
	if mid + math.ceil(d / (mid + 1)) <= n:
		return True
	return check(l, mid - 1, n, d) or check(mid + 1, r, n, d)
t = int(sys.stdin.readline())
for _ in range(t):
	(n, d) = map(int, sys.stdin.readline().split())
	if check(0, n + 1, n, d):
		print('YES')
	else:
		print('NO')


import math
for i in range(int(input())):
	(a, b) = map(int, input().split())
	flag = 0
	for j in range(0, a + 1):
		c = j + math.ceil(b / (j + 1))
		if c <= a:
			flag = 1
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')


from math import ceil, sqrt, floor
s = int(input())
for i in range(s):
	p = list(map(int, input().split()))
	n = p[0]
	d = p[1]
	x = floor(sqrt(d)) - 1
	if x + ceil(d / (x + 1)) > n:
		print('NO')
	else:
		print('YES')


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

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

def si():
	return input()

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

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

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

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

def getKey(item):
	return item[1]

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

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

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

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

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

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

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

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

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

def main():
	for _ in range(ii()):
		(n, d) = mi()
		if d <= n:
			print('YES')
			continue
		f = int(sqrt(d)) + 1
		ff = 0
		for i in range(1, f + 1):
			if i + ceil(d / (i + 1)) <= n:
				ff = 1
				break
		if ff:
			print('YES')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	flag = False
	if d <= n:
		print('YES')
		continue
	for x in range(n, 0, -1):
		if x + math.ceil(d / (x + 1)) <= n:
			flag = True
			break
	if flag:
		print('YES')
	else:
		print('NO')


import math
q = int(input())
R = lambda : map(int, input().split())
for i in range(q):
	(n, d) = R()
	if n >= d:
		print('YES')
		continue
	x = d ** (1 / 2) - 1
	x = math.ceil(x)
	if x + math.ceil(d / (x + 1)) > n:
		print('NO')
	else:
		print('YES')


def solution():
	from sys import stdout, stdin
	(_input, _print) = (stdin.readline, stdout.write)
	(_list, _range, _int) = (list, range, int)
	for _ in _range(_int(_input())):
		(n, d) = [_int(i) for i in _input().split()]
		if d <= n:
			print('YES')
			continue
		for x in _range(1, n):
			tmp = d / (x + 1)
			if tmp + x <= n:
				print('YES')
				break
		else:
			print('NO')
solution()


import math

def func(n, d):
	s = 'NO'
	if d <= n:
		s = 'YES'
	else:
		for x in range(1, n):
			if math.ceil(d / (x + 1)) + x <= n:
				s = 'YES'
				break
	return s
t = int(input())
arr = []
for i in range(1, t + 1):
	(n, d) = [int(x) for x in input().split()]
	arr.append(func(n, d))
for i in arr:
	print(i)


import sys
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	low = max(int(d ** 0.5) - 2, 0)
	high = min(int(d ** 0.5), n)
	for x in range(low, high + 1):
		curr = x + d // (x + 1)
		if d % (x + 1) > 0:
			curr += 1
		if curr <= n:
			print('YES')
			break
	else:
		print('NO')


for _ in range(int(input())):
	(n, d) = map(int, input().strip().split())
	m = (n + 1) ** 2 - 4 * d
	if m >= 0:
		a = (n - 1 + m ** 0.5) // 2
		if a // 2 >= 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


import math
t = int(input())
for i in range(0, t):
	(n, d) = [int(j) for j in input().split()]
	if n >= d:
		print('YES')
		continue
	minimumAT = math.sqrt(d) - 1
	x1 = math.floor(minimumAT)
	x2 = math.ceil(minimumAT)
	SUM1 = x1 + math.ceil(d / (x1 + 1))
	SUM2 = x2 + math.ceil(d / (x2 + 1))
	minSUM = min(SUM1, SUM2)
	if n >= minSUM:
		print('YES')
	else:
		print('NO')


from math import sqrt, ceil
from sys import stdin, stdout
from sys import maxsize
input = stdin.readline

def solve():
	pass
test = 1
test = int(input().strip())
for t in range(0, test):
	(n, d) = list(map(int, input().strip().split()))
	i = int(sqrt(d)) - 1
	ans = False
	if i + ceil(d / (i + 1)) <= n:
		ans = True
	i += 1
	if i + ceil(d / (i + 1)) <= n:
		ans = True
	i += 1
	if i + ceil(d / (i + 1)) <= n:
		ans = True
	if ans:
		print('YES')
	else:
		print('NO')
	ans = solve()


from math import ceil, floor, sqrt

def time(x, d):
	return x + ceil(d / (x + 1))
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	cands = [floor(sqrt(d) - 1), ceil(sqrt(d) - 1)]
	if min([time(cand, d) for cand in cands]) <= n:
		print('YES')
	else:
		print('NO')


from math import ceil, sqrt

def total_days(x, d_):
	return x + ceil(d_ / (x + 1))
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	x_min = ceil(sqrt(d) - 1)
	min_days_required = total_days(x_min, d)
	if min_days_required > n:
		print('NO')
	else:
		print('YES')


from collections import Counter
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import Counter
import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	f = 0
	for i in range(0, int(d ** 0.5)):
		if math.ceil(i + d / (i + 1)) <= n:
			f = 1
			break
	print('NO' if f == 0 else 'YES')


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	k = int(math.sqrt(d))
	m = 100000000
	for i in range(k + 1):
		m = min(m, i + math.ceil(d / (i + 1)))
	if m > n:
		print('NO')
	else:
		print('YES')


from math import *
t = int(input())
for i in range(t):
	temp = list(map(int, input().split(' ')))
	n = temp[0]
	d = temp[1]
	D = (n - 2) ** 2 - 4 * (d - n)
	if d < n:
		print('YES')
	elif n // 2 + ceil(d / (n // 2 + 1)) <= n:
		print('YES')
	else:
		print('NO')


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		(N, D) = map(int, input().split())
		for x in range(100000):
			if x + (D + x) // (x + 1) <= N:
				print('YES')
				break
		else:
			print('NO')
main()


import math

def solve(n, d):
	if d <= n:
		return 'YES'
	else:
		optNeeded = math.ceil(d / n)
		x = optNeeded - 1
		optRes = math.ceil(d / (x + 1))
		if optRes + x <= n:
			return 'YES'
		else:
			for i in range(x + 1, n):
				optRes = math.ceil(d / (i + 1))
				if optRes + i <= n:
					return 'YES'
	return 'NO'
numTestCase = int(input())
for i in range(numTestCase):
	(n, d) = map(int, input().split())
	print(solve(n, d))


from math import ceil as c
from math import floor as f
n = int(input())
for _ in range(n):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		xc = c(d ** 0.5)
		m = d
		for x in range(1, xc + 1):
			if x + c(d / (x + 1)) < m:
				m = x + c(d / (x + 1))
		if n >= m:
			print('YES')
		else:
			print('NO')


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	(u, v) = (max(0, int(d ** 0.5 - 1000)), min(n, int(d ** 0.5 + 1000)))
	for i in range(u, v + 1):
		if i + d // (i + 1) + int(bool(d % (i + 1))) <= n:
			print('YES')
			break
	else:
		print('NO')


import sys
from math import ceil
r_input = sys.stdin.readline
T = int(r_input())
for _ in range(T):
	(n, d) = map(int, r_input().split())
	if d <= n:
		print('YES')
	else:
		flag = 0
		for x in range(1, n + 1):
			deadline = x + ceil(d / (x + 1))
			if deadline <= n:
				flag = 1
				break
		if flag:
			print('YES')
		else:
			print('NO')


from math import ceil
for t in range(int(input())):
	(n, d) = input().split()
	n = int(n)
	d = int(d)
	if d <= n:
		print('YES')
	else:
		flag = 0
		for x in range(0, n + 1):
			if x + ceil(d / (x + 1)) <= n:
				print('YES')
				flag = 1
				break
		if x == n:
			print('NO')


def f(num):
	return num + (d - 1) // (num + 1) + 1
for i in range(int(input())):
	(n, d) = map(int, input().split())
	x1 = int(d ** (1 / 2))
	x2 = int(d ** (1 / 2)) + 1
	x3 = max(0, int(d ** (1 / 2)) - 1)
	if x1 + (d - 1) // (x1 + 1) + 1 < n or x2 + (d - 1) // (x2 + 1) + 1 < n or x3 + (d - 1) // (x3 + 1) + 1 <= n:
		print('YES')
	else:
		print('NO')


from math import sqrt, ceil, floor
INF = 1000000007

def get_ceil(a, b):
	if b <= 0:
		return INF
	return (a - 1) // b + 1
T = int(input())
for cs in range(T):
	(n, d) = map(int, input().split())
	x1 = ceil(sqrt(d))
	x2 = floor(sqrt(d))
	a1 = x1 + get_ceil(d, x1 + 1)
	a2 = x1 - 1 + get_ceil(d, x1)
	a3 = x2 + get_ceil(d, x2 + 1)
	a4 = x2 + 1 + get_ceil(d, x2 + 2)
	if a1 <= n or a2 <= n or a3 <= n or (a4 <= n):
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
import gc
gc.disable()
input = stdin.readline
import math

def check(num):
	return num + math.ceil(d / (num + 1)) <= n
t = int(input().strip())
for _ in range(t):
	(n, d) = list(map(int, input().split()))
	x = math.ceil(math.sqrt(d) - 1)
	if x + math.ceil(d / (x + 1)) <= n:
		print('YES')
	elif x - 1 >= 1 and x - 1 + math.ceil(d / x) <= n:
		print('YES')
	elif x + 1 + math.ceil(d / (x + 2)) <= n:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(0, t):
	(n, d) = [int(x) for x in input().split()]
	if n >= d:
		print('YES')
		continue
	n1 = n
	n = n // 2
	if d % (n + 1) != 0:
		d1 = d // (n + 1)
		d = d / (n + 1)
		if d > d1 and d < d1 + 1:
			d = d1 + 1
	else:
		d = d // (n + 1)
	if n + d <= n1:
		print('YES')
	else:
		print('NO')


from math import sqrt

def main():
	for _ in range(int(input())):
		(n, d) = map(int, input().split())
		x = int(sqrt(d) - 1)
		print(('NO', 'YES')[x + (d + x) // (x + 1) <= n])
main()


import math
a = int(input())
k = []
for i in range(a):
	(n, d) = list(map(int, input().rstrip().split()))
	flag = 0
	c = 0
	y = 0
	x = 0
	b = math.sqrt(d) + 10
	while b > 0:
		x = n
		y = d / (c + 1)
		if y > int(d / (c + 1)):
			y = int(y) + 1
		if n >= y:
			k.append('YES')
			flag = 1
			break
		c = c + 1
		n = n - 1
		b = b - 1
	if flag == 0:
		k.append('NO')
for f in range(a):
	print(k[f])


import math
tl = int(input())
while tl > 0:
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	elif (1 - n) ** 2 - 4 * (d - n) < 0:
		print('NO')
	else:
		print('YES')
	tl -= 1


from math import ceil
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if n == d:
		print('YES')
		continue
	for j in range(n):
		ans = ceil(d / (j + 1))
		if n - ans >= j:
			print('YES')
			break
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	s = input().split()
	n = int(s[0])
	d = int(s[1])
	if d <= n:
		print('YES')
	else:
		x = math.floor(math.sqrt(d)) - 1
		y = math.ceil(math.sqrt(d)) - 1
		x = x + math.ceil(d / (x + 1))
		y = y + math.ceil(d / (y + 1))
		if x <= n or y <= n:
			print('YES')
		else:
			print('NO')


import math
for i in range(int(input())):
	(n, d) = map(int, input().split())
	c = 0
	if d <= n:
		print('YES')
	else:
		m = int(math.sqrt(d)) + 10
		for j in range(m):
			if j + d / (j + 1) <= n:
				c = 1
				break
		if c == 1:
			print('YES')
		else:
			print('NO')


import math
for _ in range(int(input())):
	(n, d) = [int(i) for i in input().split()]
	x = int(math.sqrt(d))
	y = 2 * x - 1
	x -= 1
	if n >= d:
		print('YES')
		continue
	while y >= x:
		if y + math.ceil(d / (y + 1)) <= n:
			y = -94
			break
		y -= 1
	print('YES' if y == -94 else 'NO')


def ceil(num):
	if num % 1 == 0:
		return num
	else:
		return int(num) + 1
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		key = int(pow(d, 0.5))
		sol = key - 1 + ceil(d / key)
		if sol <= n:
			print('YES')
		else:
			print('NO')


import math

def check(x, n, d):
	val = x + math.ceil(d / (x + 1))
	if val <= n:
		return True
	return False
t = int(input())
for tt in range(t):
	(n, d) = list(map(int, input().split()))
	l = 0
	r = n - 1
	flag = False
	while l <= r:
		mid = int((l + r) / 2)
		if check(mid, n, d):
			flag = True
			break
		elif mid > math.ceil(d / (mid + 1)):
			r = mid - 1
		else:
			l = mid + 1
	if flag:
		print('YES')
	else:
		print('NO')


import sys, math
I = sys.stdin.readline
ans = ''
for _ in range(int(I())):
	(n, d) = map(int, I().split())
	if n >= d:
		ans += 'YES\n'
	else:
		x = 1 + math.ceil(d / 2)
		y = math.floor(n / 2) + math.ceil(d / (math.floor(n / 2) + 1))
		if x <= n or y <= n:
			ans += 'YES\n'
		else:
			ans += 'NO\n'
print(ans)


from math import ceil
for _ in range(int(input())):
	(n, d) = tuple(map(int, input().split()))
	if d <= n:
		print('YES')
		continue
	last = d
	for x in range(1, n):
		new = x + ceil(d / (x + 1))
		if new <= n:
			print('YES')
			break
		if last < new:
			print('NO')
			break
		last = new
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if n == 1 and d == 1:
		print('yes')
	elif n >= d:
		print('yes')
	else:
		f = 0
		for i in range(1, n):
			x = i + math.ceil(d / (i + 1))
			if x <= n:
				print('yes')
				f = 1
				break
		if f == 0:
			print('no')


import math
t = int(input())
for x in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		p = 0
		x = 1
		for x in range(max(1, math.floor(d ** 0.5) - 1), min(n, math.ceil(d ** 0.5) + 1)):
			if x + int(math.ceil(d / (x + 1))) <= n:
				print('YES')
				p = 1
				break
		if p == 0:
			print('NO')


import math
t = int(input())
results = []
for k in range(t):
	nums = input().split()
	n = int(nums[0])
	d = int(nums[1])
	result = 'NO'
	for x in range(n):
		total = x + math.ceil(d / (x + 1))
		if total <= n:
			result = 'YES'
			break
	results.append(result)
for k in range(t):
	print(results[k])


import math

def f(x):
	if x == -1:
		return 10000000000
	return x + math.ceil(d / (x + 1))
t = int(input())
for you in range(t):
	l = input().split()
	n = int(l[0])
	d = int(l[1])
	z = int(math.sqrt(d))
	lfi = []
	for i in range(max(z - 100000, 0), z + 100000):
		lfi.append(f(i))
	maxa = min(lfi)
	if maxa <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	d1 = min(d // 4, n - 1)
	if d <= n:
		print('YES')
	else:
		for i in range(1, n):
			s = i + math.ceil(d / (i + 1))
			if s <= n:
				print('YES')
				break
		else:
			print('NO')


import math
t = int(input())
for j in range(t):
	(n, k) = list(map(int, input().split()))
	i = 0
	i += math.floor(math.sqrt(k)) - 1
	k = math.ceil(k / (i + 1))
	if n - i < k:
		print('NO')
	else:
		print('YES')


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

def check(m):
	return m + ceil(D, m + 1)
for _ in range(INT()):
	(N, D) = MAP()
	low = -1
	hi = 10 ** 10
	while low + 2 < hi:
		m1 = (low * 2 + hi) // 3
		m2 = (low + hi * 2) // 3
		res1 = check(m1)
		res2 = check(m2)
		if res1 <= res2:
			hi = m2
		else:
			low = m1
	mn = INF
	for i in range(max(m1 - 1000, 0), m2 + 1000):
		mn = min(mn, check(i))
	if mn <= N:
		YES()
	else:
		NO()


from math import sqrt

def meowmeow321():
	(n, d) = [int(x) for x in input().split()]
	l = int(sqrt(d))
	start = max(0, l - 100000)
	end = min(d, l + 100000)
	for i in range(start, end + 1):
		t = i + (d + i) // (i + 1)
		if t <= n:
			print('YES')
			return
	print('NO')
t = int(input())
for a in range(t):
	meowmeow321()


import sys
import math
import itertools
import functools
import collections
import operator

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 dd():
	return collections.defaultdict(int)

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

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

def divs(n, start=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 divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

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

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

def cdiv(n, k):
	return n // k + (n % k != 0)
for _ in range(ii()):
	(n, d) = mi()
	if int(n / 2) + math.ceil(d / (int(n / 2) + 1)) <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split(' '))
	i = 0
	j = n
	flag = 0
	while i < j:
		m = (i + j) // 2
		if m + math.ceil(d / (m + 1)) <= n:
			flag = 1
			print('YES')
			break
		else:
			i = m + 1
	if not flag:
		print('NO')


import math
ans = ['NO', 'YES']
c = 0
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	q = 10 ** 9
	if d <= n:
		print('YES')
		continue
	for i in range(1, d):
		k = i + math.ceil(d / (i + 1))
		if k > q:
			c = 0
			break
		q = k
		if k <= n:
			c = 1
			break
	print(ans[c])


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
import math
for _ in range(ii()):
	(n, d) = f()
	c = 0
	if d <= n:
		print('YES')
	else:
		for i in range(1, n + 1):
			if math.ceil(d / (i + 1)) + i <= n:
				print('YES')
				c = c + 1
				break
		if c == 0:
			print('NO')


from math import ceil
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	i = 0
	found = False
	while i * i <= d:
		if ceil(d / (i + 1)) + i <= n:
			found = True
			break
		i += 1
	print('YES' if found else 'NO')


import math
T = int(input())
for t in range(T):
	n_d = input().split(' ')
	(n, d) = (int(n_d[0]), int(n_d[1]))
	x = int(math.sqrt(d)) - 1
	y = x + math.ceil(d / (x + 1))
	if y <= n:
		print('yes')
	else:
		print('no')


def checker(n, d):
	t = n // 2
	result = t * (t + 1)
	if n % 2 != 0:
		result += t + 1
	return 'YES' if d <= result else 'NO'
for _ in range(int(input())):
	(N, D) = [int(i) for i in input().split()]
	print(checker(N, D))


from sys import stdin, stdout
from math import ceil
d = 1
arr = []
for i in range(d + 1):
	arr.append([i + ceil(d / (i + 1)), i])
arr.sort()
T = int(stdin.readline().strip())

def cel(n, d):
	x = n // d
	if n % d != 0:
		x += 1
	return x
for case in range(T):
	(n, m) = map(int, stdin.readline().strip().split())
	x = ceil(m ** 0.5)
	f = False
	for i in range(x - 100, x + 100):
		if i < 0:
			continue
		if i + cel(m, i + 1) <= n:
			f = True
	if f:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		for x in range(1, n):
			y = math.ceil(d / (x + 1))
			if x + y <= n:
				print('YES')
				break
		else:
			print('NO')


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(n, d) = [int(x) for x in input().split()]
		if n == d:
			print('YES')
			continue
		for i in range(1, n):
			if n >= i + -(-d // (i + 1)):
				print('YES')
				break
		else:
			print('NO')
main()


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	x = 0
	f = False
	while x * x <= 4 * d:
		if x + math.ceil(d / (1 + x)) <= n:
			f = True
			break
		x += 1
	if f:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for tt in range(t):
	(n, d) = map(int, input().split())
	flag = False
	for x in range(int(d ** 0.5) + 10):
		temp = x + math.ceil(d / (x + 1))
		if temp <= n:
			flag = True
			break
	if flag:
		print('YES')
	else:
		print('NO')


from math import ceil
t = int(input())
for i in range(t):
	(n, d) = [int(p) for p in input().split()]
	if n >= n // 2 + ceil(d / (n // 2 + 1)):
		print('YES')
	else:
		print('NO')


from math import ceil
for case in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		x = 1
		count = 0
		while x <= n:
			a = x + ceil(d / (x + 1))
			if a <= n:
				print('YES')
				count += 1
				break
			x += 1
		if count == 0:
			print('NO')


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	tmp = int(n ** 0.5)
	for x in range(tmp - 100000, tmp + 100000):
		if x < 0:
			continue
		if x - -d // (x + 1) <= n:
			print('YES')
			break
	else:
		print('NO')


N = int(input())

def sb(a):
	if a == int(a):
		return int(a)
	else:
		return int(a) + 1
while N > 0:
	(a, b) = map(int, input().split())
	N -= 1
	if b <= a:
		print('YES')
	else:
		for x in range(1, a):
			if sb(b / (x + 1)) + x <= a:
				print('YES')
				break
		else:
			print('NO')


import math
a = int(input())

def loop(a):
	res = []
	while a != 0:
		b = input().split(' ')
		n = int(b[0])
		d = int(b[1])
		res.append(loopa(n, d))
		a -= 1
	for i in range(len(res)):
		print(res[i])

def loopa(n, d):
	if d <= n:
		return 'YES'
	for i in range(n):
		if i + math.ceil(d / (i + 1)) <= n:
			return 'YES'
	return 'NO'
loop(a)


import math
t = int(input())
while t > 0:
	t -= 1
	(n, p) = input().split()
	n = int(n)
	p = int(p)
	m = n // 2
	q = math.ceil(p / (m + 1))
	if m + q <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input(''))
while t > 0:
	(n, d) = input('').split()
	n = int(n)
	d = int(d)
	count = 0
	if n >= d:
		print('YES')
	else:
		for x in range(0, int(d ** 0.5)):
			a = x + math.ceil(d / (x + 1))
			if a <= n:
				count = 1
				break
		if count == 1:
			print('YES')
		else:
			print('NO')
	t = t - 1


import math
l = int(input())
for i in range(l):
	(n, d) = input().split()
	flag = 0
	n = int(n)
	d = int(d)
	for x in range(n):
		if n >= math.ceil(d / (x + 1)) + x:
			flag = 1
			break
	if flag:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
T = int(input())
import math
for test in range(T):
	(n, d) = map(int, input().split())
	y = int(math.sqrt(d))
	for x in range(max(0, y - 1000), y + 1000):
		if x + math.ceil(d / (x + 1)) <= n:
			print('YES')
			break
	else:
		print('NO')


T = int(input())
for i in range(0, T):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		flag = 0
		for j in range(1, n):
			p = j + d / (j + 1)
			if d / (j + 1) > d // (j + 1) and d // (j + 1) + 1 < d / (j + 1):
				p = p + 1
			if p <= n:
				print('YES')
				flag = 1
				break
		if flag == 0:
			print('NO')


from math import ceil, sqrt
from sys import stdin
t = int(stdin.readline())
while t:
	(d, n) = map(int, stdin.readline().split())
	x = 0
	f = 1
	while x <= d:
		if x + ceil(n / (x + 1)) <= d:
			print('YES')
			f = 0
			break
		x += 1
	if f:
		print('NO')
	t -= 1


import math
t = int(input())
for i in range(t):
	(n, d) = input().split()
	if int(d) <= int(n):
		print('YES')
	else:
		x = int(n) // 2
		teste = x + math.ceil(int(d) / (x + 1))
		if teste <= int(n):
			print('YES')
		else:
			print('NO')


from math import ceil
iteration = int(input())
for _ in range(iteration):
	p = True
	(n, d) = map(int, input().split())
	for x in range(n):
		if x + ceil(d / (x + 1)) <= n:
			print('YES')
			p = False
			break
	if p:
		print('NO')


t = int(input())
inputs = [list(map(int, input().split(' '))) for i in range(t)]
res = []
for i in range(len(inputs)):
	if (1 - inputs[i][0]) ** 2 - 4 * (inputs[i][1] - inputs[i][0]) < 0:
		res.append('NO')
	else:
		res.append('YES')
print('\n'.join(res))


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	for i in range(max(1, int(n ** 0.5) - 2), min(n, d // 2 + 2) + 1):
		if n >= i + math.ceil(d / (i + 1)):
			print('YES')
			break
	else:
		print('NO')


from math import ceil, sqrt
t = int(input())
for z in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	for i in range(n):
		dd = ceil(d / (i + 1))
		if dd <= n - i:
			print('YES')
			break
	else:
		print('NO')


t = int(input())
for _ in range(t):
	ls = [int(x) for x in input().split()]
	a = (1 - ls[0]) * (1 - ls[0]) - 4 * (ls[1] - ls[0])
	if a >= 0:
		print('YES')
	else:
		print('NO')


from sys import stdin, stdout
from math import ceil

def totalDays(x, d):
	return x + ceil(d / (x + 1))
T = int(stdin.readline())
for _ in range(T):
	(n, d) = map(int, stdin.readline().split())
	result = 'NO'
	if (1 - n) ** 2 - 4 * (d - n) >= 0:
		result = 'YES'
	stdout.write(result + '\n')


from math import *

def ceiling(n):
	a = int(n)
	if int(a + 1 - n) == 1:
		return a
	else:
		return a + 1
for _ in range(int(input())):
	(n, d) = input().split()
	(n, d) = (int(n), int(d))
	x = int(sqrt(d)) - 1
	if x + ceiling(d / (x + 1)) <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
ans = []
for i in range(t):
	(n, d) = map(int, input().split())
	for k in range(n):
		if k + math.ceil(d / (k + 1)) <= n:
			print('YES')
			break
		if k == n - 1:
			print('NO')


from sys import stdin
import math
input = stdin.buffer.readline

def solve(n, d):
	x = d ** 0.5 - 1
	a = math.floor(x)
	b = a + 1
	if n >= d:
		print('YES')
	elif a + math.ceil(d / (a + 1)) <= n or b + math.ceil(d / (b + 1)) <= n:
		print('YES')
	else:
		print('NO')

def main():
	T = int(input())
	for i in range(T):
		(n, d) = [int(i) for i in input().split()]
		solve(n, d)
main()


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):
	(n, d) = inp()
	if d <= n:
		ans = 'YES'
	else:
		val1 = int(sqrt(d)) - 1
		ch = val1 + ceil(d / (val1 + 1))
		if ch <= n:
			ans = 'YES'
		else:
			ans = 'NO'
	out(ans)


t = int(input())
from math import ceil
for _ in range(t):
	(n, d) = [int(x) for x in input().split()]
	if n >= d:
		print('YES')
	else:
		minm = 10 ** 9 + 1
		i = 1
		while i * i <= d:
			ans = i + ceil(d / (i + 1))
			minm = min(minm, ans)
			i += 1
		if minm > n:
			print('NO')
		else:
			print('YES')


import io
import os
from collections import Counter, defaultdict, deque

def solve(N, D):
	x = int((D + 0.25) ** 0.5 - 0.5)
	for i in range(max(0, x - 10), x + 10):
		days = i + D // (i + 1)
		if D % (i + 1) != 0:
			days += 1
		if days <= N:
			return 'YES'
	return 'NO'
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(N, D) = [int(x) for x in input().split()]
	ans = solve(N, D)
	print(ans)


import os, sys
from io import BytesIO, IOBase

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

def si():
	return input()

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

def li():
	return list(mi())
import math
for i in range(ii()):
	(n, d) = mi()
	if d <= n:
		print('YES')
	else:
		a = math.ceil(d / (n // 2 + 1))
		a += n // 2
		if a <= n:
			print('YES')
		else:
			print('NO')


import math
for _ in range(int(input())):
	(n, d) = list(map(int, input().split()))
	res = 'NO'
	cur = d
	for i in range(n + 1):
		t = i + math.ceil(d / (i + 1))
		if t <= n:
			res = 'YES'
			break
		if t > cur:
			break
	print(res)


import math
for i in range(int(input())):
	(n, d) = [int(i) for i in input().split()]
	ans = 'NO'
	if n >= d:
		print('YES')
	else:
		for i in range(min(100000, n)):
			temp = i + math.ceil(d / (i + 1))
			if temp <= n:
				ans = 'YES'
				break
		print(ans)


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	dr = int(math.sqrt(d))
	best = n + 1
	for x in range(max(0, dr - 10), dr + 10):
		try:
			best = min(best, x + math.ceil(d / (x + 1)))
		except:
			pass
	if best <= n:
		print('YES')
	else:
		print('NO')


import math
T = int(input())
while T:
	(N, D) = map(int, input().split())
	if D <= N:
		print('YES')
	else:
		boo = True
		for i in range(1, N + 1):
			if i + math.ceil(D / (i + 1)) <= N:
				print('Yes')
				boo = False
				break
		if boo:
			print('NO')
	T -= 1


def deadline(n, d):
	if d <= n:
		return 'YES'
	else:
		for i in range(n):
			if d / (i + 1) == d // (i + 1):
				x = d // (i + 1)
			else:
				x = d // (i + 1) + 1
			if i + x <= n:
				return 'YES'
		return 'NO'
t = int(input())
array = []
for j in range(t):
	(a, b) = list(map(int, input().split(' ')))
	array.append([a, b])
for a in array:
	print(deadline(a[0], a[1]))


for _ in range(int(input())):
	(n, d) = list((int(x) for x in input().split()))
	x = int(d ** 0.5 - 1)
	if n >= x + int(d / (x + 1) + 0.999999999999):
		print('YES')
	else:
		print('NO')


import math
for i in range(int(input())):
	(n, d) = map(int, input().split())
	if n == d:
		print('YES')
		continue
	res = False
	for i in range(1, n // 2 + 1):
		a = i + math.ceil(d / (i + 1))
		if a <= n:
			res = True
			break
	print('YES' if res else 'NO')


import math

def sol(n, d):
	if d <= n:
		return 'YES'
	for x in range(n):
		if x + math.ceil(d / (x + 1)) <= n:
			return 'YES'
	return 'NO'
n = int(input().strip())
for _ in range(n):
	val = list(map(int, input().strip().split()))
	print(sol(val[0], val[1]))


def ceiling(n):
	e = 1e-06
	if n - int(n) <= e:
		return int(n)
	return int(n) + 1

def solve(n, d):
	for i in range(0, n):
		if i + ceiling(d / (i + 1)) <= n:
			print('YES')
			return
	print('NO')

def main():
	tc = int(input())
	for _ in range(tc):
		(n, d) = [int(x) for x in input().split()]
		solve(n, d)
main()


def r(n):
	if n % 1 > 0:
		return int(n) + 1
	else:
		return int(n)
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	else:
		t = 0
		for i in range(1, n):
			if r(d / (i + 1)) <= n - i:
				print('YES')
				t = 1
				break
		if not t:
			print('NO')


from math import *
for zz in range(int(input())):
	(n, d) = map(int, input().split())
	ha = False
	cd = 1
	while cd <= d:
		cv = d / cd
		if cd - 1 + cv <= n:
			ha = True
			break
		if cd < d:
			cd = ceil(d / (cv - 1))
		else:
			cd = d + 1
	if ha:
		print('YES')
	else:
		print('NO')


def solve(n, d):
	from math import ceil
	x = 0
	s = x + ceil(d / (x + 1))
	while s > n:
		s = x + ceil(d / (x + 1))
		if x > n:
			return 'NO'
		x += 1
	if x <= n:
		return 'YES'
	else:
		return 'NO'
from math import ceil
from sys import stdin
t = int(stdin.readline())
while t:
	(n, d) = map(int, stdin.readline().split())
	print(solve(n, d))
	t -= 1


def func(x, d):
	return x + d / (x + 1)

def ternary_search_min(l, r, d):
	while r - l >= 3:
		m1 = int(r - 2 * (r - l) / 3)
		m2 = int(r - (r - l) / 3)
		if func(m1, d) <= func(m2, d):
			r = m2
		else:
			l = m1
	remain_args = [i for i in range(l, r + 1)]
	func_values = list(map(lambda x: func(x, d), remain_args))
	return min(func_values)
test_size = int(input())
for i in range(test_size):
	(n, d) = map(int, input().split())
	min_days = ternary_search_min(0, n, d)
	if min_days <= n or d <= n:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	w = (n - 1) ** 2
	q = 4 * (d - n)
	if w >= q:
		print('YES')
	else:
		print('NO')


from math import ceil
T = int(input())
for _ in range(T):
	(N, D) = list(map(int, input().split()))

	def calc(D, x):
		return x + ceil(D / (x + 1))
	for i in range(N):
		if calc(D, i) <= N:
			print('YES')
			break
	else:
		print('NO')


T = int(input())
from math import log
for t in range(T):
	(n, d) = [int(x) for x in input().split()]
	if d <= n:
		print('YES')
		continue
	if n % 2 == 0:
		mid = n // 2 + 1 - 1
	else:
		mid = (n + 1) // 2 - 1
	ans = (mid - n) * (mid + 1)
	if ans <= -d:
		print('YES')
	else:
		print('NO')


t = int(input())
for test in range(t):
	(n, d) = [int(x) for x in input().split()]
	x = n // 2
	den = x + 1
	delta = (n - x) * (x + 1)
	if d <= delta:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, d) = [int(__) for __ in input().split()]
	if d <= n:
		print('YES')
		continue
	else:
		a = 0
		if d ** 0.5 % 1 == 0:
			a = int(d ** 0.5) - 1
		else:
			a = int(d ** 0.5)
		if d % (a + 1) == 0:
			if a + d // (a + 1) <= n:
				print('YES')
			else:
				print('NO')
		elif a + d // (a + 1) + 1 <= n:
			print('YES')
		else:
			print('NO')


from math import ceil
for _ in range(int(input())):
	(n, d) = list(map(int, input().split()))
	for x in range(n):
		long = x + ceil(d / (x + 1))
		if long <= n:
			print('YES')
			break
	if long > n:
		print('NO')


from math import ceil
t = int(input())
for j in range(t):
	(n, d) = list(map(int, input().split()))
	start = 0
	end = n
	flag = 0
	while start <= end:
		mid = (start + end) // 2
		if ceil(d / (mid + 1)) + mid <= n:
			flag = 1
			break
		else:
			start = mid + 1
	if flag == 0:
		print('NO')
	else:
		print('YES')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if d > n:
		bestdays = d
		flag = 0
		for x in range(1, n):
			curdays = math.ceil(d / (x + 1)) + x
			if curdays <= n:
				flag = 1
				print('YES')
				break
			elif curdays < bestdays:
				bestdays = curdays
		if flag == 0:
			print('NO')
	else:
		print('YES')


import math as mt
for tc in range(int(input())):
	(a, b) = map(int, input().split())
	c = a // 2
	d = mt.ceil(b / (c + 1))
	if c + d <= a:
		print('YES')
	else:
		print('NO')


from math import ceil
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	s = list()
	for i in range(n):
		s.append(i + ceil(d / (i + 1)))
		if i != 0 and s[i - 1] < s[i]:
			break
	if min(s) <= n:
		print('YES')
	else:
		print('NO')


import collections
import math
local = False
if local:
	file = open('A.txt', 'r')

def inp():
	if local:
		return file.readline().rstrip()
	else:
		return input().rstrip()

def ints():
	return [int(_) for _ in inp().split()]
t = int(inp())
for _ in range(t):
	(n, d) = ints()
	if d <= n:
		print('YES')
	else:
		found = False
		for i in range(n):
			if i + math.ceil(d / (i + 1)) <= n:
				found = True
				break
		if found:
			print('YES')
		else:
			print('NO')


t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	b = n - 1
	a = 1
	c = d - n
	if n >= d:
		print('YES')
		continue
	else:
		eq = b * b - 4 * a * c
		if eq < 0:
			print('NO')
			continue
		else:
			print('YES')


import math
t = int(input())
while t > 0:
	(n, d) = map(int, input().split())
	if 2 * math.sqrt(d) - 1 <= n:
		print('YES')
	else:
		print('NO')
	t -= 1


from math import ceil
t = int(input())
for i in range(t):
	n_d = list(map(int, input().split(' ')))
	(n, d) = n_d
	if d <= n:
		print('YES')
	else:
		x = 1
		flag = 0
		while x < n - 1:
			if ceil(d / (x + 1)) + x <= n:
				flag = 1
				break
			x += 1
		if flag:
			print('YES')
		else:
			print('NO')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	flag = 0
	if d <= n:
		print('YES')
	elif (n + 1) ** 2 < 4 * d:
		print('NO')
	else:
		for k in range(1, d):
			if k + math.ceil(d / (k + 1)) <= n:
				flag = 1
				break
		if flag == 1:
			print('YES')
		else:
			print('NO')


import math
for _ in range(int(input())):
	flag = 0
	(n, m) = [int(i) for i in input().split()]
	if n >= m:
		print('YES')
	else:
		for i in range(1, n):
			if math.ceil(m / (i + 1)) + i <= n:
				print('YES')
				flag = 1
				break
		if flag == 0:
			print('NO')


import math

def isPossible(n, d):
	low = 0
	high = n - 1
	while low < high:
		mid = (low + high) // 2
		x = mid + 1
		d1 = math.ceil(d / (n - x + 1))
		if d1 <= x:
			return 'YES'
		elif d1 > x:
			low = mid + 1
	return 'NO'
for _ in range(int(input())):
	(n, d) = [int(x) for x in input().split()]
	if d <= n:
		print('YES')
	else:
		print(isPossible(n, d))


import math
t = int(input())
while t > 0:
	ta = input().split()
	n = int(ta[0])
	d = int(ta[1])
	c = 0
	if d <= n:
		print('YES')
	else:
		sq = n // 2
		for i in range(1, sq + 1):
			v = i + math.ceil(d / (i + 1))
			if v <= n:
				print('YES')
				c += 1
				break
		if c == 0:
			print('NO')
	t -= 1


import math
t = int(input())
a = list()
for i in range(t):
	s = input().split()
	(n, d) = (int(s[0]), int(s[1]))
	if d <= n:
		a.append('YES')
	else:
		x = n // 2
		k = math.ceil(d / (x + 1))
		if k + x <= n:
			a.append('YES')
		else:
			a.append('NO')
for i in a:
	print(i)


import math

def how_time(x, d):
	return x + math.ceil(d / (x + 1.0))

def main():
	EPS = 0.001
	t = int(input())
	while t > 0:
		t -= 1
		(n, d) = map(int, input().split())
		if math.sqrt(d) - int(math.sqrt(d)) < EPS and how_time(int(math.sqrt(d) - 1), d) <= n:
			print('YES')
			continue
		l = 0
		r = n
		while r - l > 2:
			m1 = int((2 * l + r) / 3)
			m2 = math.ceil((l + 2 * r) / 3)
			if how_time(m1, d) > how_time(m2, d):
				l = m1
			else:
				r = m2
		if how_time(l, d) <= n or how_time(r, d) <= n or how_time((l + r) / 2, d) <= n:
			print('YES')
		else:
			print('NO')
main()


import math

def getResult(n, d):
	if d <= n:
		print('YES')
		return
	else:
		for i in range(math.ceil(n / 2)):
			v = i + math.ceil(d / (i + 1))
			if v <= n:
				print('YES')
				return
	print('NO')
	return

def Deadline():
	t = int(input())
	for _ in range(t):
		(n, d) = list(input().split(' '))
		getResult(int(n), int(d))
Deadline()


t = int(input())
while t:
	(n, d) = map(int, input().rstrip().split(' '))
	if n < 3:
		if d <= n:
			print('YES')
		else:
			print('NO')
	elif n % 2:
		if d <= (n // 2 + 1) * (n // 2 + 1):
			print('YES')
		else:
			print('NO')
	elif d <= n // 2 * (n // 2 + 1):
		print('YES')
	else:
		print('NO')
	t -= 1


from math import ceil, floor

def sim(x, d):
	return x + ceil(d / (x + 1))
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	lowest = 1000000000.0
	x = d ** 0.5
	if min(sim(ceil(x), d), sim(ceil(x - 1), d), sim(ceil(x + 1), d)) <= n:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	(N, D) = map(int, input().split())
	if N == 1 and D == 1:
		print('YES')
	elif N >= D:
		print('YES')
	else:
		FLAG = 0
		for i in range(1, N):
			X = i + math.ceil(D / (i + 1))
			if X <= N:
				print('YES')
				FLAG = 1
				break
		if FLAG == 0:
			print('NO')


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

def rints():
	return list(map(int, input().split()))
t = rint()
from math import sqrt, ceil
for _ in range(t):
	(n, d) = rints()
	ds = int(sqrt(d))
	pos = False
	for i in range(-10, 10):
		if ds + i < 0 or ds + i > n:
			continue
		pos = pos or ds + i + int(ceil(d / (ds + i + 1))) <= n
	print('Yes' if pos else 'No')


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	for i in range(500000):
		if i + (d + i) // (i + 1) <= n:
			print('YES')
			break
	else:
		print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		count = 0
		for x in range(1, (n + 1) // 2 + 2):
			time = math.ceil(d / (x + 1))
			time += x
			if time <= n:
				count += 1
				print('YES')
				break
		if count == 0:
			print('NO')


from math import *
f = lambda x, d: ceil(x + d / (x + 1))
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	x = d ** 0.5 - 1
	min_y = min(f(ceil(x), d), f(floor(x), d))
	if min_y > n:
		print('NO')
	else:
		print('yEs')


import sys
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	res = d
	for a in range(int(d ** 0.5) - 10, int(d ** 0.5) + 10):
		if a < 0:
			continue
		res = min(res, a + (d + a) // (a + 1))
	if res <= n:
		print('YES')
	else:
		print('NO')


MOD = 1000000007
MOD2 = 998244353
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
for _ in range(ii()):
	(n, d) = f()
	if d <= n:
		print('YES')
	else:
		fg = 0
		for i in range(1, min(10 ** 7, n + 1)):
			if (d + i) // (i + 1) + i <= n:
				fg = 1
				break
		if fg == 0:
			print('NO')
		else:
			print('YES')


def nd(n, d):
	foo = 0
	if n >= d:
		return 'YES'
	if d > n:
		for x in range(n + 1):
			foo = foo + 1
			if d / (foo + 1) <= n - foo:
				return 'YES'
		else:
			return 'NO'
times = int(input())
for i in range(times):
	nums = input().split(' ')
	print(nd(int(nums[0]), int(nums[1])))


t = int(input())
import math
for _ in range(t):
	a = input().split()
	n = int(a[0])
	d = int(a[1])
	if d <= n:
		print('YES')
		continue
	res = False
	for x in range(1, min(n, d), 1):
		f = x + math.ceil(d / (x + 1))
		if f <= n:
			res = True
			break
	if res:
		print('YES')
	else:
		print('NO')


import math

def calc(x, d, n):
	if x < 0:
		return False
	return x + (d + x) // (x + 1) <= n

def check(n, d):
	n_ = int(math.sqrt(d))
	r = 1000
	for i in range(n_ - r, n_ + r):
		if calc(i, d, n):
			return True
	return False
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	print('YES' if check(n, d) else 'NO')


t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		c = (n - 1) / 2
		d = c + d / (c + 1)
		if d <= n:
			print('YES')
		else:
			print('NO')


def gg(a, b):
	return a + b / (a + 1)
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	l = 0
	r = n
	while l + 1 < r:
		m = (l + r) // 2
		if gg(m, d) > n:
			r = m
		else:
			l = m
	if gg(l, d) <= n:
		print('YES')
	else:
		print('NO')


from math import ceil
for _ in range(int(input())):
	l = list(map(int, input().split()))
	(n, d) = (l[0], l[1])
	if d <= n:
		print('YES')
		continue
	for i in range(1, n):
		if i + ceil(d / (i + 1)) <= n:
			print('YES')
			break
	else:
		print('NO')


import math
n = int(input())
for i in range(n):
	y = 0
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		for i in range(1, n + 1):
			if n >= i + math.ceil(d / (i + 1)):
				y = y + 1
			if y == 1:
				print('YES')
				break
			else:
				pass
		if y == 0:
			print('NO')


def main():
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		for i in range(1, n):
			dx = i + (d + i) // (i + 1)
			if n >= dx:
				print('YES')
				break
		else:
			print('NO')
t = int(input())
for i in range(t):
	main()


from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	x = int(d ** 0.5)
	for i in range(max(0, x - 3), x + 3):
		if n >= i + (d + i) // (i + 1):
			print('YES')
			break
	else:
		print('NO')


import sys
integer = lambda : int(sys.stdin.readline())
l = lambda : list(map(int, sys.stdin.readline().strip().split()))
for _ in range(integer()):
	(n, d) = l()
	got_it = False
	for i in range(n):
		if i + (d + i) // (i + 1) <= n:
			got_it = True
			break
	if got_it:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	(n, m) = map(int, input().split())
	a = n // 2
	b = math.ceil(m / (a + 1))
	if a + b <= n:
		print('YES')
	else:
		print('NO')


from math import ceil as c
from math import sqrt
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	m = x
	for i in range(1, c(sqrt(x))):
		m = min(m, c(x / (i + 1)) + i)
	print('YES' if m <= n else 'NO')


import math
T = int(input())
for t in range(T):
	(n, d) = [int(x) for x in input().split()]
	a = math.floor(math.sqrt(d))
	if d == a ** 2:
		m = 2 * a - 1
	elif d <= a * (a + 1):
		m = 2 * a
	else:
		m = 2 * a + 1
	if m <= n:
		print('YES')
	else:
		print('NO')


import math

def constraint(x, d):
	return math.ceil(d / (x + 1)) + x

def solve(n, d):
	x = (n - 1) / 2
	x1 = math.floor(x)
	x2 = math.ceil(x)
	return constraint(x1, d) <= n or constraint(x2, d) <= n
T = int(input())
for t in range(T):
	(n, d) = list(map(int, input().split()))
	print('YES' if solve(n, d) else 'NO')


from math import ceil

def fun(n, d):
	f = 0
	if d <= n:
		return 'YES'
	for i in range(1, n):
		if i + ceil(d / (i + 1)) <= n:
			f = 1
			break
	if f == 0:
		return 'NO'
	else:
		return 'YES'
t = int(input())
p = []
for i in range(t):
	(n, d) = input().split()
	p.append(fun(int(n), int(d)))
for j in range(len(p)):
	print(p[j])


t = int(input())
for _ in range(t):
	(n, d) = [int(x) for x in input().split()]
	X = int(d ** 0.5) - 1
	ok = False
	for x in range(max(X - 4, 0), X + 6):
		lhs = x + d // (x + 1)
		if d % (x + 1) != 0:
			lhs += 1
		if lhs <= n:
			ok = True
	if ok:
		print('YES')
	else:
		print('NO')


from collections import deque
from math import log, sqrt, ceil

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

def si():
	return input()

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

def li():
	return list(mi())
t = ii()
while t:
	t -= 1
	(n, d) = mi()
	f = 0
	if d <= n:
		f = 1
	else:
		for i in range(1, int(sqrt(d)) + 1):
			if i + ceil(d / (i + 1)) <= n:
				f = 1
				break
	if f:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, d) = map(int, input().split())
	x = n - 1
	b = False
	if d <= n:
		b = True
	else:
		while not b and x >= 0:
			if x + d // (x + 1) + (d % (x + 1) != 0) <= n:
				b = True
			x -= 1
	print('YES' if b else 'NO')


from math import ceil
n = int(input())
for _ in range(n):
	(n, d) = [int(x) for x in input().split()]
	res = 'NO'
	for x in range(n):
		a = x + ceil(d / (x + 1))
		if a <= n:
			res = 'YES'
			break
	print(res)


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		fg = 0
		for i in range(1, min(10 ** 7, n + 1)):
			if i + (d + i) // (i + 1) <= n:
				fg = 1
				break
		print('YES' if fg else 'NO')


T = int(input())
for t in range(T):
	(n, d) = map(int, input().split())
	flag = 0
	for x in range(n):
		if x * x + x * (1 - n) + d - n <= 0:
			print('YES')
			flag = 1
			break
	if flag == 0:
		print('NO')


from math import ceil
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		z = int(d ** 0.5)
		den1 = d / (z + 1)
		ans1 = ceil(den1) + z
		den2 = d / z
		ans2 = ceil(den2) + z - 1
		den3 = d / (z + 2)
		ans3 = ceil(den3) + z + 1
		if min(ans1, ans2, ans3) > n:
			print('NO')
		else:
			print('YES')


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

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

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

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

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

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

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

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

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

def solve():
	t = I()
	for i in range(t):
		(n, d) = LI()
		for x in range(40000):
			if x + math.ceil(d / (x + 1)) <= n:
				print('YES')
				break
		else:
			print('NO')
	return
solve()


import math
t = int(input())
while t:
	t -= 1
	(n, d) = map(int, input().split())
	if d <= n:
		print('yes')
	else:
		c = 1
		for i in range(1, n):
			if math.ceil(d / (i + 1)) + i <= n:
				c = 0
				print('Yes')
				break
		if c:
			print('No')


import math
t = int(input())
for testcase in range(t):
	(n, d) = map(int, input().split(' '))
	f = False
	for i in range(int(math.sqrt(d)) + 1):
		if i + math.ceil(d / (i + 1)) <= n:
			f = True
			break
	if not f:
		print('NO')
	else:
		print('YES')


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		m = int(pow(d, 0.5)) - 1
		z = m + math.ceil(d / (m + 1))
		if z <= n:
			print('YES')
		else:
			print('NO')


import sys
from math import sqrt

def read_in():
	stri = sys.stdin.readline()
	return stri.strip()

def from_str_to_list(stri):
	res_List = []
	for i in stri.split():
		res_List.append(int(i))
	return res_List

def main():
	t = int(read_in())
	f = 0
	for i in range(t):
		data = from_str_to_list(read_in())
		n = data[0]
		d = data[1]
		for j in range(-5, 7):
			x = int(sqrt(d)) + j
			if x >= 0:
				if x + int((d - 1) / (x + 1)) + 1 <= n:
					print('YES')
					f = 1
					break
		if f == 0:
			print('NO')
		f = 0
	return
main()


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

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

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

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

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

def b_seach(n, d):
	l = 0
	r = n
	while l <= r:
		mid = l + (r - l) // 2
		tot = mid + int(ceil(d / (mid + 1)))
		if tot <= n:
			return mid
		l = mid + 1
	return -1

def main():
	t = inp()
	for _ in range(t):
		(n, d) = invr()
		if n >= d:
			print('YES')
			continue
		res = b_seach(n, d)
		if res >= 0:
			print('YES')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


import math
z = input
for i in range(int(z())):
	(a, b) = map(int, z().split())
	if a >= b:
		print('YES')
		continue
	c = 0
	for i in range(1, a // 2 + 1):
		if math.ceil(b / (i + 1)) + i <= a:
			print('YES')
			c = 1
			break
	if c == 0:
		print('NO')


from collections import Counter
from collections import defaultdict
import math
t = int(input())
for _ in range(0, t):
	(n, d) = list(map(int, input().split()))
	b = n * n + 2 * n - 4 * d + 1
	if b < 0:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	mi = d
	q = 0
	if d <= n:
		print('YES')
		continue
	for x in range(1, min(n, d)):
		mi = min(x + (d + x) // (x + 1), mi)
		if mi <= n:
			print('YES')
			q = 1
			break
	if not q:
		print('NO')


for _ in range(int(input())):
	(n, m) = map(int, input().split())
	s = n // 2
	a = m / (n // 2 + 1)
	ans = a + s
	if ans <= n:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
while t != 0:
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		f1 = 1
		for i in range(1, n + 1):
			p = math.ceil(d / (i + 1)) + i
			if p <= n:
				print('YES')
				f1 = 0
				break
		if f1 == 1:
			print('NO')
	t -= 1


t = int(input())
for x in range(t):
	ui = input().split()
	n = int(ui[0])
	d = int(ui[1])
	if d <= n:
		print('YES')
		continue
	divide = 0
	flag = False
	while divide < n:
		if divide + d / (divide + 1) <= n:
			flag = True
			break
		divide += 1
	if flag == True:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for T in range(0, t):
	(n, d) = [int(x) for x in input().split()]
	if d <= n:
		print('YES')
	else:
		b = True
		for i in range(1, n - 1):
			j = math.ceil(d / (i + 1))
			if j + i <= n:
				print('YES')
				b = False
				break
		if b:
			print('NO')


from math import ceil as c
for _ in range(int(input())):
	(n, d) = list(map(int, input().split()))
	if d <= n:
		print('YES')
		continue
	else:
		flag = 1
		for x in range(1, n + 1):
			if x + c(d / (x + 1)) <= n:
				flag = 0
				break
		if flag:
			print('NO')
		else:
			print('YES')


from math import ceil

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

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

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

def si():
	return input()
t = ii()
while t:
	t -= 1
	(n, d) = mi()
	f = 0
	if d <= n:
		f = 1
	else:
		for i in range(1, n + 1):
			r = i + ceil(d / (i + 1))
			if r <= n:
				f = 1
				break
	if f == 1:
		print('YES')
	else:
		print('NO')


import io, sys, atexit, os
import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations
from itertools import combinations

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

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

def nu():
	return int(input())

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

def lcm(x, y):
	gg = find_gcd(x, y)
	return x * y // gg

def check(a, b, n):
	if ma.ceil(b / (a + 1)) + a <= n:
		return True
	else:
		return False
mm = 1000000007

def solve():
	t = nu()
	for tt in range(t):
		(a, b) = num()
		if check(a // 2, b, a) or check(a // 2 + 1, b, a):
			print('yes')
		else:
			print('no')
solve()


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	first = 0
	last = n
	while first <= last:
		mid = (first + last) // 2
		val = math.ceil(d / (mid + 1)) + mid
		if val <= n:
			print('YES')
			break
		last = mid - 1
	else:
		print('NO')


def f(x):
	return x + d // (x + 1) + (d % (x + 1) != 0)
t = int(input())
for i in range(t):
	(n, d) = [int(x) for x in input().split()]
	x = d ** 0.5 // 1
	if x > 0:
		x -= 1
	if f(x) <= n:
		print('YES')
	else:
		print('NO')


def ch(x, d):
	return x + d // (x + 1) + bool(d % (x + 1))
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	l = 0
	r = n - 1
	while r - l > 1:
		x = (l + r) // 2
		if ch(x, d) <= n:
			print('YES')
			break
		else:
			r = x
	else:
		print('NO')


import random

def main():
	t = int(input())
	for _ in range(t):
		(n, d) = map(int, input().split())
		for x in range(max(0, n // 2 - 3), min(n, n // 2 + 3)):
			if d <= (n - x) * (x + 1):
				print('YES')
				break
		else:
			print('NO')
main()


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

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

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

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

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

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

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

def givevalue(a, d):
	return a + math.ceil(d / (a + 1))
for _ in range(val()):
	(n, d) = li()
	currmin = d
	for i in range(min(d, 10 ** 5)):
		currmin = min(currmin, givevalue(i, d))
	print('YES' if currmin <= n else 'NO')


from sys import stdin
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin

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

def fi():
	return float(stdin.readline())

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

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

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

def lsi():
	x = list(stdin.readline())
	x.pop()
	return x

def si():
	return stdin.readline()

def sieve(x):
	a = [True] * (x + 1)
	sq = floor(sqrt(x))
	for i in range(3, sq + 1, 2):
		if a[i]:
			for j in range(i * i, x + 1, i):
				a[j] = False
	if x > 1:
		p = [2]
	else:
		p = []
	for i in range(3, x + 1, 2):
		if a[i]:
			p.append(i)
	return p
ans = ['YES', 'NO']
for _ in range(ii()):
	f = 1
	(n, d) = mi()
	if d > n:
		m = n - 1
		while m:
			if m + ceil(d / (m + 1)) <= n:
				f = 0
				break
			else:
				m //= 2
	else:
		f = 0
	print(ans[f])


import sys
input = sys.stdin.readline
Q = int(input())
Query = [list(map(int, input().split())) for _ in range(Q)]
for (N, K) in Query:
	P = [N // 2, N // 2 + 1]
	ok = False
	for p in P:
		if p + (K + p) // (p + 1) <= N:
			ok = True
			break
	print('YES' if ok else 'NO')


import math

def canOptmize(limit, n_days):
	x = 0
	while x < limit:
		d = math.ceil(n_days / (x + 1))
		if x + d <= limit:
			return True
		x += 1
	return False
n = int(input())
for i in range(n):
	(limit, n_days) = map(int, input().split())
	result = 'YES' if canOptmize(limit, n_days) else 'NO'
	print(result)


import math
t = int(input())
while t > 0:
	(n, d) = map(int, input().split())
	hoga = 0
	for x in range(0, n + 1):
		if x + math.ceil(d / (x + 1)) <= n:
			hoga = 1
			break
	if hoga == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


from math import ceil, inf
T = int(input())
for _ in range(T):
	(n, d) = map(int, input().split())
	m = inf
	for i in range(int(d ** 0.5) + 1):
		m = min(m, i + ceil(d / (i + 1)))
	print('YES') if min(d, m) <= n else print('NO')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import ceil, floor
from copy import *
from collections import deque, defaultdict
from collections import Counter as counter
from itertools import combinations
from itertools import permutations as permutate
from bisect import bisect_left as bl
from operator import *
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192
from sys import stderr

class FastIO(IOBase):
	newlines = 0

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

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

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

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

class IOWrapper(IOBase):

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

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

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

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def pow(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
from functools import reduce

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

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

def prefix_sum(ar):
	return list(accumulate(ar))

def suffix_sum(ar):
	return list(accumulate(ar[::-1]))[::-1]

def N():
	return int(inp())
from collections import defaultdict

def numberOfSetBits(i):
	i = i - (i >> 1 & 1431655765)
	i = (i & 858993459) + (i >> 2 & 858993459)
	return ((i + (i >> 4) & 252645135) * 16843009 & 4294967295) >> 24

def solve():
	(n, d) = sep()
	t1 = n // 2
	t2 = ceil(n / 2)
	a = t1 + ceil(d / (1 + t1))
	b = t2 + ceil(d / (1 + t2))
	if a <= n or b <= n:
		print('YES')
	else:
		print('NO')
testcase(int(inp()))


import math
testCases = int(input())
for _ in range(testCases):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		optimalX = math.floor(n / 2)
		minimumDays = optimalX + math.ceil(d / (optimalX + 1))
		if n >= minimumDays:
			print('YES')
		else:
			print('NO')


import sys, itertools, math
T = int(sys.stdin.readline())
for _ in range(T):
	(n, d) = [int(i) for i in sys.stdin.readline().strip().split(' ')]
	for x in range(0, n):
		if x + math.ceil(d / (x + 1)) <= n:
			print('YES')
			break
	else:
		print('NO')


from math import *
t = int(input())
while t:
	t -= 1
	lst = list(map(int, input().split()))
	if lst[1] <= lst[0]:
		print('YES')
	else:
		x = (1 - lst[0]) ** 2
		r = (lst[0] - lst[1]) * 4
		if x + r < 0:
			print('NO')
		else:
			print('YES')


t = int(input())
from math import ceil
for i in range(t):
	arr = 10 ** 100
	(n, d) = [int(x) for x in input().split()]
	a = int(d ** 0.5)
	for i in range(a + 100):
		arr = min(arr, i + ceil(d / (i + 1)))
	if arr <= n:
		print('YES')
	else:
		print('NO')


import math
for i in range(int(input())):
	a = list(input().split())
	a = [int(i) for i in a]
	for i in range(a[0]):
		if a[0] - i >= math.ceil(a[1] / (1 + i)):
			print('YES')
			break
	else:
		print('NO')


import math

def solve():
	(n, d) = map(float, input().split())
	x = d ** 0.5 - 1
	cur = math.ceil(x)
	if cur + math.ceil(d / (cur + 1)) <= n:
		print('YES')
		return
	cur = math.floor(x)
	if cur + math.ceil(d / (cur + 1)) <= n:
		print('YES')
		return
	print('NO')
	return
for _ in range(int(input())):
	solve()


nt = int(input())
import math
while nt != 0:
	(n, d) = map(int, input().split())
	flag = 0
	if d <= n:
		print('YES')
	else:
		for i in range(1, n + 1):
			if math.ceil(d / (i + 1)) + i <= n:
				print('YES')
				flag = 1
				break
		if flag == 0:
			print('NO')
	nt -= 1


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		for x in range(1, int(math.sqrt(d)) + 1):
			res = x + math.ceil(d / (x + 1))
			if res <= n:
				print('YES')
				break
		else:
			print('NO')


import math
Result = []
getLimit = int(input())
for i in range(1, getLimit + 1):
	canFit = False
	ND_List = list(map(int, input().strip().split()))[:2]
	if ND_List[0] >= ND_List[1]:
		Result.append('YES')
		canFit = True
	else:
		for j in range(1, ND_List[0]):
			if j + math.ceil(ND_List[1] / (j + 1)) <= ND_List[0]:
				Result.append('YES')
				canFit = True
				break
		if canFit is False:
			Result.append('NO')
for i in range(0, getLimit):
	Show = Result[i]
	print(Show)


import math
n = int(input())
for i in range(n):
	(a, d) = map(int, input().split())
	x = math.ceil(d ** 0.5)
	n1 = x + math.ceil(d / (x + 1))
	n2 = x + 1 + math.ceil(d / (x + 2))
	n3 = x - 1 + math.ceil(d / x)
	if d <= a or min(n1, n2, n3) <= a:
		print('YES')
	else:
		print('NO')


e = []
for i in range(int(input())):
	(n, d) = map(int, input().split())
	r = 0
	for x in range(n, -1, -1):
		a = x + (int(d / (x + 1) + 1) - d / (x + 1)) % 1 + d / (x + 1)
		if a <= n:
			r = 1
			e.append('YES')
			break
	if r == 0:
		e.append('NO')
for i in e:
	print(i)


def solveOne():

	def f(x):
		return x + (d + x) // (x + 1)
	prev = float('inf')
	for x in range(n + 1):
		res = f(x)
		if res <= n:
			return 'YES'
		if res > prev:
			return 'NO'
		prev = res
	return 'NO'
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	print(solveOne())


import math

def check(n, d):
	for i in range(0, int(math.sqrt(d)), 1):
		if i + math.ceil(d / (i + 1)) <= n:
			return True
	return False

def main():
	t = int(input())
	while t > 0:
		(n, d) = [int(x) for x in input().split(' ')]
		yes = check(n, d)
		if yes:
			print('YES')
		else:
			print('NO')
		t -= 1
main()


from math import sqrt, ceil

def solve_quad(a, b, c):
	D = b ** 2 - 4 * a * c
	if D < 0:
		return None
	res = [0, 0]
	res[0] = (-b - sqrt(D)) / (2 * a)
	res[1] = (-b + sqrt(D)) / (2 * a)
	return res

def check_validity(n, d):
	res = solve_quad(1, 1 - n, d - n)
	if res is None:
		print('NO')
	elif ceil(res[0]) <= res[1]:
		print('YES')
	else:
		print('NO')
n_samples = input()
for i in range(0, int(n_samples)):
	sample_str = input()
	sample_data = sample_str.split(' ')
	n = int(sample_data[0])
	d = int(sample_data[1])
	check_validity(n, d)


import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('yes')
	else:
		s = int(math.ceil(math.sqrt(d)))
		if s - 1 + int(math.ceil(d / s)) <= n:
			print('yes')
		else:
			print('no')


import math
t = int(input())
no = 'NO'
yes = 'YES'
for _ in range(t):
	y = input().split()
	N = int(y[0])
	e = int(y[1])
	if e <= N:
		print('YES')
	else:
		q = (N - 1) ** 2 - 4 * (e - N)
		if q < 0:
			print(no)
		else:
			U = (N - 1 + q ** 0.5) / 2
			L = (N - 1 - q ** 0.5) / 2
			if U >= 0:
				if int(U) + int(math.ceil(e / (int(U) + 1))) <= N:
					print(yes)
				elif L >= 0 and int(L) + int(math.ceil(e / (int(L) + 1))) <= N:
					print(yes)
				elif int((L + U) / 2) >= 0 and int((L + U) / 2) + int(math.ceil(e / (int((L + U) / 2) + 1))) <= N:
					print(yes)
				else:
					print(no)
			else:
				print(no)


import math
t = int(input())
for i in range(t):
	(n, d) = list(map(float, input().split()))
	data = []
	data.append(d)
	x = 1
	while True:
		curr = x + math.ceil(d / (x + 1))
		if curr > data[-1]:
			break
		data.append(curr)
		x = x + 1
	if data[-1] > n:
		print('NO')
	else:
		print('YES')


import math
t = int(input())
for j in range(0, t):
	(n, k) = (int(x) for x in input().split())
	if n >= k:
		print('YES')
		continue
	else:
		i = 1
		flag = False
		while i < n:
			if math.ceil(k / (i + 1)) + i <= n:
				print('YES')
				flag = True
				break
			i += 1
		if flag == False:
			print('NO')


import math
t = int(input())
for _ in range(0, t):
	(n, d) = map(int, input().split())
	for i in range(0, int(pow(d, 1 / 2))):
		if i + math.ceil(d / (i + 1)) <= n:
			print('YES')
			break
		if i == int(pow(d, 1 / 2)) - 1:
			print('NO')


from math import sqrt
t = int(input())
while t:
	t -= 1
	(n, d) = [int(x) for x in input().split()]
	ans = 9999999999999999999999999999999999
	for i in range(max(0, int(sqrt(d) - 1000)), max(0, int(sqrt(d) + 1000))):
		temp = d // (i + 1)
		if d % (i + 1):
			temp += 1
		ans = min(ans, temp + i)
	if ans <= n:
		print('Yes')
	else:
		print('No')


import math

def bSearch():
	g = [int(i) for i in input().split()]
	n = g[0]
	d = g[1]
	if (1 - n) ** 2 >= 4 * (d - n):
		return 'YES'
	else:
		return 'NO'
t = int(input())
for i in range(t):
	print(bSearch())


import math
T = int(input())
for t in range(T):
	(n, d) = map(int, input().split(' '))
	if d <= n:
		print('YES')
		continue
	x1 = math.ceil(math.sqrt(d)) - 1
	x2 = math.floor(math.sqrt(d)) - 1
	if min(x1 + math.ceil(d / (x1 + 1)), x2 + math.ceil(d / (x2 + 1))) <= n:
		print('YES')
	else:
		print('NO')


import math

def fun(x, d):
	return x + math.ceil(d / (x + 1))
t = int(input())
for i in range(0, t):
	(n, d) = [int(x) for x in input().split()]
	val = -1 + (1 + 4 * d) ** 0.5
	val = val // 2
	flg = 0
	if fun(val, d) <= n:
		flg = 1
	elif val - 1 >= 0 and fun(val - 1, d) <= n:
		flg = 1
	elif fun(val + 1, d) <= n:
		flg = 1
	else:
		flg = 0
	if flg == 0:
		print('NO')
	else:
		print('YES')


import math
t = int(input())

def y(x, d):
	return x + math.ceil(d / (x + 1))
ans = []
for i in range(t):
	(n, d) = map(int, input().split())
	x = 0
	if n < d:
		while True:
			if y(x, d) < y(x + 1, d):
				break
			x += 1
		if n >= y(x, d):
			ans.append('YES')
		else:
			ans.append('NO')
	else:
		ans.append('YES')
for i in range(t):
	print(ans[i])


from collections import defaultdict as dc
from collections import deque as dq
import bisect
import sys
import math
mod = 10 ** 9 + 7

def bs(a, x):
	i = bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return len(a)

def binarysearchforsolvingeqautions(a, i, l, r):
	while 1:
		mid = (l + r) / 2
		(p, q) = force(a, mid, i)
		if abs(p - q) < 1e-13:
			return mid
		elif p > q:
			l = mid
		else:
			r = mid

def bs(z, x, n):
	l = 0
	r = len(z) - 1
	ans = -1
	mk = n
	while l < r:
		mid = (l + r) // 2
		if lcm(z[mid], x, n):
			if mk > max(z[mid], x):
				mk = max(z[mid], x)
				ans = z[mid]
			r = mid - 1
		else:
			l = mid + 1
	return ans

def digit(n):
	a = []
	while n > 0:
		a.append(n % 10)
		n = n // 10
	return a

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

def line():
	p = list(map(int, input().split()))
	return p

def lcm(n, d):
	p = n - 1
	z = pow(p, 2) + 4 * (d - n)
	if z >= 0:
		q = pow(z, 0.5)
		x = p - q
		y = p + q
		l = math.ceil(x / 2)
		r = math.ceil(y / 2)
		return (l, r, x // 2, y // 2)
	return (-1, -1, -1, -1)

def check(n, d, x):
	if x < 0:
		return 0
	return n >= x + math.ceil(d / (x + 1))

def ans(x, y, n, d):
	for i in range(4):
		if check(n, d, x[i]):
			return 1
	for i in range(4):
		if check(n, d, y[i]):
			return 1
	return 0
for _ in range(int(input())):
	(n, d) = line()
	if n >= d:
		print('YES')
	else:
		k = 0
		for i in range(1, int(pow(d, 0.5)) + 1):
			if check(n, d, i):
				k = 1
				print('YES')
				break
		if k == 0:
			print('NO')


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		(lb, ub, flag) = (0, n, 0)
		while lb < ub:
			mid = (lb + ub) // 2
			v = mid + int(math.ceil(d / (mid + 1)))
			if v <= n:
				flag = 1
				break
			else:
				ub = mid
		if lb == ub:
			v = lb + int(math.ceil(d / (lb + 1)))
			if v <= n:
				flag = 1
		if flag == 1:
			print('YES')
		else:
			print('NO')


from math import ceil as c
s = []
for uiu in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		s.append('YES')
	else:
		m = (1 + 4 * d) ** 0.5 / 2 - 0.5
		for i in range(int(m // 1) - 1, int(m // 1) + 1):
			if i + c(d / (i + 1)) <= n:
				s.append('YES')
				break
		if uiu + 1 != len(s):
			s.append('NO')
for i in s:
	print(i)


test_cases = int(input())
answer = ''
for _ in range(test_cases):
	n_d = input()
	n_d = n_d.split()
	n = int(n_d[0])
	d = int(n_d[1])
	possible = False
	for x in range(n):
		if x + d / (x + 1) <= n:
			possible = True
			break
		else:
			pass
	if possible:
		answer += 'YES' + '\n'
	else:
		answer += 'NO' + '\n'
print(answer)


import math

def solve(n, d):
	for i in range(1, n // 2 + 1):
		cl = float(d) / (i + 1)
		cl = math.ceil(cl)
		if i + cl <= n:
			return 'YES'
	return 'NO'
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		ans = solve(n, d)
		print(ans)


import math

def deadLine(n, d):
	if d <= n:
		return True
	elif n + 1 >= math.ceil(math.sqrt(4 * d)):
		return True
	else:
		return False
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if deadLine(n, d) == True:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	check = 0
	if b <= a:
		print('YES')
		continue
	for i in range(1, int(b ** 0.5) + 1):
		if i + math.ceil(b / (i + 1)) <= a:
			check = 1
			print('YES')
			break
	if check == 0:
		print('NO')


import math

class Solution:

	def solve(self, n, d):
		if d <= n:
			return True
		nRemaining = n
		for x in range(1, n):
			tempD = math.ceil(d / (x + 1))
			nRemaining -= 1
			if tempD <= nRemaining:
				return True
		return False
sol = Solution()
t = int(input().strip())
for i in range(t):
	[n, d] = list(map(int, input().strip().split()))
	print('YES' if sol.solve(n, d) else 'NO')


def main():
	t = int(input())
	for _ in range(t):
		(n, d) = map(int, input().split())
		x = (n - 1) // 2
		if x + (d + x) // (x + 1) <= n:
			print('YES')
		else:
			x = n // 2
			if x + (d + x) // (x + 1) <= n:
				print('YES')
			else:
				x = (n + 1) // 2
				if x + (d + x) // (x + 1) <= n:
					print('YES')
				else:
					print('NO')
	return
main()


import math

def optimize(n, d):
	if d <= n:
		return 'YES'
	k = (1 - n) ** 2 - 4 * (d - n)
	if k >= 0:
		sol1 = math.ceil((-(1 - n) - math.sqrt(k)) / 2)
		sol2 = math.ceil((-(1 - n) + math.sqrt(k)) / 2)
		if sol1 > 0 or sol2 > 0:
			return 'YES'
		else:
			return 'NO'
	else:
		return 'NO'

def main():
	for _ in range(int(input())):
		(n, d) = map(int, input().split(' '))
		r = optimize(n, d)
		print(r)
main()


a = int(input())
for _ in range(a):
	(z, x) = map(int, input().split())
	for i in range(z):
		q = i + x / (i + 1)
		if q <= z:
			print('YES')
			z = 0
			break
	if z:
		print('NO')


import math

def main():
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
		return
	mid = n // 2
	while mid < n:
		eq = mid + math.ceil(d / (mid + 1))
		if eq <= n:
			print('YES')
			return
		mid += 1
	mid = n // 2
	while mid >= 1:
		eq = mid + math.ceil(d / (mid + 1))
		if eq <= n:
			print('YES')
			return
		mid -= 1
	print('NO')
	return
t = int(input())
for _ in range(t):
	main()


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):
		(n, d) = LI()
		r = False
		if n >= d:
			r = True
		s = int(d ** 0.5)
		for i in range(max(1, s - 3), s + 4):
			t = i + (d + i) // (i + 1)
			if n >= t:
				r = True
				break
		rr.append(IF(r, 'YES', 'NO'))
	return JA(rr, '\n')
print(main())


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		i = 0
		ans = 0
		cnt = 0
		while i * i <= d:
			ans = i
			ans += d // (i + 1)
			if d % (i + 1):
				ans += 1
			if ans <= n:
				cnt = 1
			if cnt:
				break
			i += 1
		if cnt:
			print('YES')
		else:
			print('NO')


import math
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	i = 1
	flag = False
	while i <= n:
		if math.ceil(d / (i + 1)) + i <= n:
			print('YES')
			flag = True
			break
		i += 1
	if flag == False:
		print('NO')


import math

def check(x):
	g = math.ceil(d / (x + 1))
	if x + g > n:
		return True
	else:
		return False
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('Yes')
		continue
	l = 0
	r = n
	ans = -1
	while l < r:
		mid = (l + r) // 2
		if check(mid):
			r = mid - 1
		else:
			l = mid + 1
			ans = mid
			break
	if ans == -1:
		print('No')
	else:
		print('Yes')


from math import ceil
calc = lambda d, x: x + ceil(d / (x + 1))

def bin_solve(n, d):
	(left, right) = (0, n)
	last = None
	while left <= right:
		x = (left + right) // 2
		if x == last:
			return False
		if n - 1 < calc(d, x) <= n:
			return True
		elif n - 1 >= calc(d, x):
			left = x
		else:
			right = x
		last = x
	return False

def solve(n, d):
	if d <= n:
		return True
	if n < 5:
		for x in range(n + 1):
			if calc(d, x) <= n:
				return True
		return False
	return bin_solve(n, d)
T = int(input())
for _ in range(T):
	(n, d) = map(int, input().split())
	if solve(n, d):
		print('YES')
	else:
		print('NO')


from math import ceil
for t in range(int(input())):
	(n, d) = map(int, input().split())
	ans = 'NO'
	for x in range((n - 1) // 2, (n - 1) // 2 + 3):
		if x + ceil(d / (x + 1)) <= n:
			ans = 'YES'
			break
	print(ans)


import math
test = int(input())
while test:
	(n, d) = map(int, input().split(' '))
	temp = math.floor((n * (n + 1) - d) / (n + 1))
	while temp >= 0:
		if temp + math.ceil(d / (temp + 1)) <= n:
			print('YES')
			break
		else:
			temp -= 1
	if temp < 0:
		print('NO')
	test -= 1


import math
for _ in range(int(input())):
	f = -10
	(n, b) = map(int, input().split())
	if n > 100000:
		f = 1000
	else:
		for i in range(n):
			if math.ceil(i + b / (i + 1)) <= n:
				f = 1000
				break
	if f == 1000:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(d, c) = map(int, input().split())
	x2 = int((c + 0.5) ** 0.5)
	for x in (x2 - 1, x2, x2 + 1):
		if x + (c + x) // (x + 1) <= d:
			print('YES')
			break
	else:
		print('NO')


lis1 = []
t = int(input())
for i in range(t):
	a = input().split()
	n = int(a[0])
	d = int(a[1])
	if d <= n:
		lis1.append('YES')
		continue
	delta = (1 - n) ** 2 - 4 * (d - n)
	if delta >= 0:
		lis1.append('YES')
		continue
	lis1.append('NO')
for j in range(len(lis1)):
	print(lis1[j])


from math import sqrt, ceil
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		a = int(sqrt(d))
		b = a - 1
		if a + ceil(d / (a + 1)) <= n:
			print('YES')
		elif b + ceil(d / (b + 1)) <= n:
			print('YES')
		else:
			print('NO')


t = int(input())
ans = []
for i in range(t):
	(n, d) = map(int, input().split())
	if n >= d:
		ans.append('YES')
	elif n ** 2 + 1 + 2 * n - 4 * d >= 0:
		ans.append('YES')
	else:
		ans.append('NO')
print(*ans, sep='\n')


from sys import stdin, stderr

def rl():
	return [int(w) for w in stdin.readline().split()]
from math import *
(T,) = rl()
for _ in range(T):
	(n, d) = rl()
	xa = floor(sqrt(d))
	for x in range(xa - 5, xa + 5):
		if x >= 0 and x + ceil(d / (x + 1)) <= n:
			print('YES')
			break
	else:
		print('NO')


for _ in [0] * int(input()):
	(n, d) = map(int, input().split())
	D = (1 - n) ** 2 - 4 * (d - n)
	if D < 0:
		print('NO')
		continue
	if (-(1 - n) + D ** 0.5) // 2 < 0 and (-(1 - n) - D ** 0.5) // 2 < 0:
		print('NO')
		continue
	print('YES')


import math
T = int(input())
for x in range(T):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	else:
		flag = False
		for i in range(1, n):
			k = i + math.ceil(d / (i + 1))
			if k <= n:
				flag = True
				break
		if flag:
			print('YES')
		else:
			print('NO')


import math
n = 0
d = 0

def get(x):
	return x + d / (x + 1)
for i in range(int(input())):
	(n, d) = map(int, input().split())
	(l, r) = (0, n)
	while l + 2 < r:
		m1 = (l * 2 + r) // 3
		m2 = (l + r * 2) // 3
		if get(m1) > get(m2):
			l = m1
		else:
			r = m2
	timer1 = get(l)
	timer2 = get(r)
	timer3 = get((l + r) // 2)
	if min(timer1, timer2, timer3) <= n:
		print('YES')
	else:
		print('NO')


def f(n):
	root = int(n ** (1 / 2))
	if root != n ** (1 / 2):
		root += 1
	high = root ** 2
	if high - n < root:
		return 2 * root - 1
	return 2 * root - 2
t = int(input())
for _ in range(t):
	(n, d) = [int(x) for x in input().split(' ')]
	if f(d) <= n:
		print('YES')
	else:
		print('NO')


import math as m
t = int(input())
for i in range(t):
	(n, d) = list(map(int, input().split()))
	val = m.ceil(m.sqrt(d))
	ans = False
	for j in range(0, val):
		x = j + d // (j + 1)
		if d % (j + 1) != 0:
			x += 1
		if x <= n:
			ans = True
			break
	if ans:
		print('YES')
	else:
		print('NO')


import sys
import math
import heapq
import bisect
import re
from collections import deque
from decimal import *
from fractions import gcd

def main():
	(n, d) = [int(i) for i in sys.stdin.readline().split()]
	if n >= d:
		print('YES')
		return 0
	r = n
	l = 0
	while r != l + 1:
		m = (r + l) // 2
		if (d + m) // (m + 1) + m <= n:
			print('YES')
			return 0
		else:
			r = m
	print('NO')
for i in range(int(input())):
	main()


import math
t = int(input())
while t:
	t = t - 1
	(n, d) = map(int, input().split())
	x = math.ceil(2 * math.sqrt(d) - 1)
	if d <= n or x <= n:
		print('YES')
	else:
		print('NO')


import math
for _ in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
	else:
		x = 1
		ok = False
		opt = x + math.ceil(d / (x + 1))
		if opt <= n:
			ok = True
		while opt > n and x < n:
			opt = x + math.ceil(d / (x + 1))
			if opt <= n:
				ok = True
				break
			x += 1
		if ok:
			print('YES')
		else:
			print('NO')


from sys import stdin
import math
r = stdin.readline
d = int()

def fun(x):
	global d
	return x + math.ceil(d / (x + 1))

def binsearch(fun, x, lo, hi):
	while lo + 1 < hi:
		mid = lo + hi >> 1
		if fun(mid) <= x:
			lo = mid
		else:
			hi = mid
	return fun(lo) <= x

def main():
	global d
	queries = int(r())
	for query in range(queries):
		(n, d) = map(int, r().strip().split())
		print('YES' if binsearch(fun, n, 0, n) else 'NO')
main()


import math

def chk(x):
	f = math.ceil(x * 1.0 + d * 1.0 / (x + 1) * 1.0)
	return f <= n
t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	ans = 'YES'
	if d > n:
		l = 1
		r = n - 1
		while 1 <= r:
			m = (l + r) // 2
			if chk(m):
				break
			else:
				r = m - 1
		if 1 > r:
			ans = 'NO'
	print(ans)


from math import ceil
a = int(input())
for _ in range(a):
	(x, y) = map(int, input().split())
	if ceil(2 * y ** 0.5 - 1) <= x:
		print('YES')
	else:
		print('NO')


a = int(input())
for i in range(a):
	(b, c) = [int(i) for i in input().split()]
	n = 0
	for j in range(b + 1):
		if c // (j + 1) >= c / (j + 1):
			n = c // (j + 1) + j
		else:
			n = c // (j + 1) + j + 1
		if n <= b:
			n = 1
			break
	if n == 1:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	(n, d) = map(int, input().split())
	d1 = (1 - n) ** 2 - d * 4 + 4 * n
	if d1 < 0:
		print('NO')
	else:
		x1 = (n - 1 + d1 ** 0.5) / 2
		x2 = (n - 1 - d1 ** 0.5) / 2
		if x1 > x2:
			(x1, x2) = (x2, x1)
		if x1 <= int(x2):
			print('YES')
		else:
			print('NO')


t = int(input())

def f(x):
	return x + (d - 1) // (x + 1) + 1 <= n
ans = []
for _ in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		ans.append('yes')
	else:
		l = 0
		r = n
		while r - l > 1:
			m = (r + l) // 2
			if f(m):
				ans.append('yes')
				break
			else:
				l = m
		else:
			if f(r):
				ans.append('yes')
			else:
				ans.append('no')
for i in ans:
	print(i)


def f(l):
	(d, n) = l
	if n <= d:
		return True
	f = (n << 2) + (d + 1) % 2
	return d >= (f - 1) // (d + 1)
q = int(input())
for _ in range(q):
	l = list(map(int, input().split()))
	print('YES' if f(l) else 'NO')


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if d <= n:
		print('YES')
		continue
	val = n // 2
	maxi = (n - val) * (val + 1)
	if d <= maxi:
		print('YES')
	else:
		print('NO')


import math
t = int(input())
for r in range(1, t + 1):
	(n, d) = [int(s) for s in input().split(' ')]
	f = False
	for x in range(max(0, math.floor(n / d - 1)), n):
		if x + math.ceil(d / (x + 1)) <= n:
			print('YES')
			f = True
			break
	if not f:
		print('NO')


import math

def main():
	t = int(input())
	for _ in range(t):
		(n, d) = [int(x) for x in input().split()]
		p = int(math.sqrt(d))
		if p * p == d:
			x = p * 2 - 1
		else:
			x = p + math.ceil(d / p) - 1
		if n >= x:
			print('YES')
		else:
			print('NO')
main()


import math
k = int(input())
for z in range(k):
	arr = [int(i) for i in input().split()]
	(n, d) = (arr[0], arr[1])
	if d <= n:
		print('YES')
	else:
		res = math.floor(n / 2)
		if res + math.ceil(d / (res + 1)) <= n:
			print('YES')
		else:
			print('NO')


T = int(input())
for i in range(T):
	l = list(map(int, input().split()))
	if l[1] <= l[0]:
		print('YES')
		continue
	k = 'n'
	for j in range(1, l[0] // 2 + 1):
		x = l[1] // (j + 1)
		y = l[1] % (j + 1)
		if y == 0 and x + j <= l[0] or (y != 0 and x + 1 + j <= l[0]):
			print('YES')
			k = 'y'
			break
	if k == 'n':
		print('NO')


mod = 10 ** 9 + 7
import math
from collections import Counter
from itertools import combinations
import math

def ain():
	return map(int, input().split())
t = int(input())
for _ in range(t):
	(n, d) = ain()
	if d <= n:
		print('YES')
	else:
		x = 1
		ci = int(math.ceil(d / (x + 1)))
		minv = x + ci
		while x < d:
			x = x + 1
			ci = int(math.ceil(d / (x + 1)))
			if x + ci > minv:
				break
			minv = min(minv, x + ci)
		if minv <= n:
			print('YES')
		else:
			print('NO')


import math

def solve(n, d):
	g = d ** 0.5
	(a, b) = (math.floor(g) - 1, math.ceil(g) - 1)
	return b * (b + 1) + d <= n * (b + 1) or a * (a + 1) + d <= n * (a + 1)
T = int(input())
for _ in range(T):
	ok = solve(*map(int, input().strip().split()))
	print(['NO', 'YES'][ok])


import math
x = int(input())
for i in range(x):
	(daysLeft, runTime) = [int(x) for x in input().split()]
	if runTime <= daysLeft:
		print('YES')
		continue
	else:
		didIt = False
		for j in range(daysLeft):
			totalDays = 0
			specialNum = math.ceil(runTime / (j + 1))
			totalDays = j + specialNum
			if totalDays <= daysLeft:
				print('YES')
				didIt = True
				break
		if not didIt:
			print('NO')


import sys
import math
import heapq
import collections

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

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

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

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

def inputstringnum():
	return [ord(x) - ord('a') for x in input()]

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

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	(n, d) = inputnums()
	x = math.sqrt(d) - 1
	a = math.ceil(x)
	b = math.floor(x)
	if a + math.ceil(d / (a + 1)) <= n or b + math.ceil(d / (b + 1)) <= n:
		print('YES')
	else:
		print('NO')


import math

def fun():
	(n, d) = map(int, input().split())
	if n >= d:
		return 'YES'
	else:
		for i in range(1, n):
			temp = i + math.ceil(d / (i + 1))
			if n >= temp:
				return 'YES'
	return 'NO'
t = int(input())
for i in range(t):
	print(fun())


import math
for _ in range(int(input())):
	(n, m) = map(int, input().split())
	if n >= m:
		print('YES')
	else:
		f = 0
		for t in range(1, int(math.sqrt(m))):
			a = t + math.ceil(m / (t + 1))
			if a <= n:
				f = 1
				break
		print('YES' if f else 'NO')


from math import sqrt
t = int(input())
while t > 0:
	t -= 1
	(n, d) = map(int, input().split())
	p = int(sqrt(d)) + 2
	ok = False
	for x in range(p):
		if x + d / (x + 1) <= n:
			ok = True
			break
	if ok:
		print('YES')
	else:
		print('NO')


import math
n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	b = float(b)
	flag = True
	for j in range(a):
		x = j + math.ceil(b / (j + 1.0))
		if x <= a:
			flag = False
			print('YES')
			break
	if flag:
		print('NO')


def find_suppose_time(x, case):
	(n, d) = case
	return x + d / (x + 1)

def injure_into_case(case: list):
	(needed, now) = case
	(left, right) = (0, needed)
	while right - left > 20:
		suppose_left = left + (right - left) // 3
		suppose_right = right - (right - left) // 3
		if find_suppose_time(suppose_left, case) <= find_suppose_time(suppose_right, case):
			right = suppose_right
		elif find_suppose_time(suppose_left, case) > find_suppose_time(suppose_right, case):
			left = suppose_left
	best_time = min([find_suppose_time(i, case) for i in range(left, right + 1)])
	return best_time <= needed
cases = [[int(i) for i in input().split()] for j in range(int(input()))]
for case in cases:
	print('YES' if injure_into_case(case) else 'NO')


from math import *
for _ in range(int(input())):
	(a, b) = [int(x) for x in input().split()]
	r = 'NO'
	if b > a:
		for j in range(1, a):
			if j + ceil(b / (j + 1)) <= a:
				r = 'YES'
				break
	else:
		r = 'YES'
	print(r)


import math as m
t = int(input())
while t:
	t -= 1
	(n, d) = list(map(int, input().split()))
	x = 0
	f = 0
	while x < n:
		if x + m.ceil(d / (x + 1)) <= n:
			print('YES')
			f = 1
			break
		x += 1
	if f == 0:
		print('NO')


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

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

def S():
	return input()

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

def MS():
	return map(str, input().split())

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

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

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

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

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

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
YN = {False: 'No', True: 'Yes'}
MOD = 10 ** 9 + 7
inf = float('inf')
IINF = 10 ** 10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10 ** 6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
show_flg = False

def main():
	T = I()
	n = [0] * T
	d = [0] * T
	for i in range(T):
		(n[i], d[i]) = MI()
	for i in range(T):
		N = n[i]
		D = d[i]
		minv = 10 ** 19
		for mid in range(int(D ** 0.5) + 1):
			days = mid + (D + (mid + 1) - 1) // (mid + 1)
			minv = min(minv, days)
		if minv <= N:
			print('YES')
		else:
			print('NO')
main()


import math
t = int(input())
for i in range(t):
	(n, d) = map(int, input().split())
	d = math.sqrt(d)
	if 2 * d - 1 <= n:
		print('Yes')
	else:
		print('No')


import math
t = int(input())
for i in range(t):
	caso = list(map(int, input().split(' ')))
	if caso[1] <= caso[0]:
		print('YES')
	else:
		for j in range(1, caso[0] + 1):
			if j + math.ceil(caso[1] / (j + 1)) <= caso[0]:
				print('YES')
				break
		else:
			print('NO')


from math import ceil
T = int(input())
ans = []
for t in range(T):
	(n, d) = input().split(' ')
	(n, d) = (int(n), int(d))
	if d <= n:
		ans.append('YES')
	else:
		x = (n - 1) // 2
		if x + ceil(d / (x + 1)) <= n and x >= 1:
			ans.append('YES')
		else:
			ans.append('NO')
for a in ans:
	print(a)


for _ in range(int(input().strip())):
	(n, d) = [int(__) for __ in input().strip().split()]
	if d <= n:
		print('YES')
	else:
		x = (1 - n) ** 2 - 4 * (d - n)
		if x >= 0:
			print('YES')
		else:
			print('NO')


for i in range(int(input())):
	(n, d) = map(int, input().split())
	if d <= n:
		print('yes')
	else:
		count = 0
		for j in range(1, n):
			if d % (j + 1) != 0:
				if j + int(d / (j + 1) + 1) <= n:
					print('yes')
					count = 1
					break
			elif d % (j + 1) == 0:
				if j + int(d / (j + 1)) <= n:
					print('yes')
					count = 1
					break
		if count == 0:
			print('no')


for _ in range(int(input())):
	r = [int(i) for i in input().split()]
	n = r[0]
	d = r[1]
	kq = 'NO'
	if d <= n:
		print('YES')
		continue
	for i in range(1, n):
		if d % (i + 1) != 0:
			chia = d // (i + 1) + 1
		else:
			chia = d // (i + 1)
		if i + chia <= n:
			kq = 'YES'
			break
	print(kq)


from math import floor, ceil
t = int(input())
for i in range(t):
	(n, d) = list(map(int, input().split()))
	print('\n')
	low = 0
	high = n
	found = False
	while low < high:
		mid = low + (high - low) // 2
		if mid + ceil(d / (mid + 1)) <= n:
			high = mid
			found = True
		else:
			low = mid + 1
	if found:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, d) = map(int, input().split())
	if n >= d:
		print('YES')
	else:
		D = (n - 1) ** 2 + 4 * (n - d)
		if D < 0:
			print('NO')
		elif (n - 1 + D ** 0.5) / 2 < 1:
			print('NO')
		else:
			print('YES')


t = int(input())
for i in range(t):
	n = [int(i) for i in input().split()]
	x0 = int(n[1] ** 0.5 - 1)
	x1 = x0 + 1
	da = min(x0 + (n[1] + x0) // (x0 + 1), x1 + (n[1] + x1) // (x1 + 1))
	if da > n[0]:
		print('NO')
	else:
		print('YES')


def getRoots(d, n):
	d = d ** 0.5 - 1
	e = [d - 2, d - 1, d, d + 1, d + 2]
	e = [int(k) for k in e]
	return e

def correct(k, d, n):
	if k < 0:
		return False
	b = 0
	if d % (k + 1) == 0:
		b = d // (k + 1)
	else:
		b = d // (k + 1) + 1
	return k + b <= n
for tests in range(int(input())):
	(n, d) = map(int, input().split())
	k = getRoots(d, n)
	done = False
	if n >= d:
		print('YES')
		continue
	for k1 in k:
		if correct(k1, d, n):
			print('YES')
			done = True
			break
	if not done:
		print('NO')