chotu-and-teddy-day
Source: hackerearth
Difficulty: EASY

On the eve of Teddy Day Chotu decided to buy a teddy for his girlfriend Choti. He has N coins each having distinct value from 1 to N. Now after collecting all the coins he went to buy a Teddy. 

Now the shopkeeper Motu told Chotu that there is only one Teddy in the shop of Value K. As Chotu is very bhondu(idiot) he wonders whether he can buy that teddy or not. As you are Chotu's friend, help him solve the problem.

Input

First line contains integer T denoting number of testcases. 

Second line contains two integer N and K denoting values of coins and value of Teddy respectively.

Output

For each test case print "YES" if chotu can buy teddy else "NO" without quotes.

Constraints

1 ≤ T ≤ 100 

1 ≤ N ≤ 10^8

1 ≤ K ≤ 10^18

SAMPLE INPUT
2
5 8
4 20

SAMPLE OUTPUT
YES
NO

Explanation

In the first case Chotu can use coins of value  3 and 5 to make 8.

In the second case Chotu cannot make the desired value.


t=int(input())
while t>0:
	n,k=input().split()
	n,k=int(n),int(k)
	n*=(n+1)
	n/=2
	if n>=k:
		print("YES")
	else:
		print("NO")
	t-=1
	


t=int(input())
while t>0:
	n,k=input().split()
	n,k=int(n),int(k)
	n*=(n+1)
	n/=2
	if n>=k:
		print("YES")
	else:
		print("NO")
	t-=1