#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(int argc, char const *argv[]) {
  int t;
  scanf("%d", &t);
  while (t--) {
    ll x, y;
    scanf("%lld %lld", &x, &y);
    if (x == 2 && y == 3) {
      printf("YES\n");
      continue;
    }
    if (x >= y) {
      printf("YES\n");
      continue;
    }
    if (x <= 3 && y > x) {
      printf("NO\n");
      continue;
    }
    printf("YES\n");
  }
  return 0;
}
