#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b == 0 ? a : gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a * (b / gcd(a, b));
}
int dr[] = {+1, -1, +0, +0};
int dc[] = {+0, +0, +1, -1};
int X[] = {+0, +0, +1, -1, -1, +1, -1, +1};
int Y[] = {-1, +1, +0, +0, +1, +1, -1, -1};
int KX[] = {-2, -2, -1, -1, 1, 1, 2, 2};
int KY[] = {-1, 1, -2, 2, -2, 2, -1, 1};
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, d;
    cin >> n >> d;
    int lo = 0, hi = n;
    int f = 0;
    while (lo <= hi) {
      long long int md = (lo + hi) / 2;
      long long int second = ceil((float)d / (md + 1));
      long long int x = (md + second);
      if (x <= n) {
        hi = md - 1;
        f = 1;
      } else {
        int yy = ceil((float)d / (lo + 1));
        int y = (lo + yy);
        if (y <= n) {
          f = 1;
          break;
        } else
          lo++;
      }
    }
    if (f)
      printf("YES\n");
    else
      printf("NO\n");
  }
}
