#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int t;
  cin >> t;
  for (int k = 0; k < t; k++) {
    int n;
    cin >> n;
    int d;
    cin >> d;
    int l = 0, r = n;
    int mid = (l + r) / 2;
    int kof = (d / (mid + 1)) + (bool)(d % (mid + 1)) + mid, kot = 0;
    int h = 0;
    while (r - l > 1) {
      if ((d / (mid + 1)) + (bool)(d % (mid + 1)) + mid < kof) {
        if (h == 1) {
          int lcp = l;
          l = mid;
          kot = l - lcp;
          kof = (d / (mid + 1)) + (bool)(d % (mid + 1));
        } else if (h == 2) {
          int rcp = r;
          r = mid;
          kot = rcp - r;
          kof = (d / (mid + 1)) + (bool)(d % (mid + 1));
        }
      } else {
        if (h == 0) {
          h = 2;
          r = mid;
        } else if (h == 1) {
          l -= kot;
          r = (l + r) / 2;
          h = 2;
        } else if (h == 2) {
          r += kot;
          l = (l + r) / 2;
          h = 1;
        }
      }
    }
    if (kof > n) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
  return 0;
}
