#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n, d;
int f(int x) { return x + ceil((double)d / (x + 1)) - n; }
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    bool v = false;
    scanf("%d %d", &n, &d);
    int l = 0, r = n, mid;
    while (l <= r) {
      mid = (r + l) / 2;
      if (f(mid) > 0)
        r = mid - 1;
      else if (f(mid) < 0)
        l = mid + 1;
      else {
        v = true;
        break;
      }
    }
    if (v)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
