#include <bits/stdc++.h>
using namespace std;
int up(int x, int y) {
  int s = x / y * y;
  if (s == x)
    return x / y;
  else
    return x / y + 1;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, d;
    scanf("%d%d", &n, &d);
    if (d < n || (n / 2 + up(d, n / 2 + 1)) <= n)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
