#include <bits/stdc++.h>
using namespace std;
int f(int x, int d) {
  if (x <= 0) return 1e9;
  int ans = x + (d / (x + 1)) + 1;
  if (d % (x + 1) == 0) ans--;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, d;
    cin >> n >> d;
    int test = sqrt(d) - 1;
    int mini = d;
    for (int i = -2; i <= 2; i++) {
      mini = min(mini, f(test + i, d));
    }
    if (mini <= n)
      cout << "YES\n";
    else {
      cout << "NO\n";
    }
  }
  return 0;
}
