#include <bits/stdc++.h>
using namespace std;
void fileIO() {
  freopen("immetric.in", "r", stdin);
  ;
  freopen("immetric.out", "w", stdout);
  ;
}
int main() {
  int t;
  scanf("%d", &t);
  for (int z = 0; z < t; z++) {
    int a, b;
    scanf("%d %d", &a, &b);
    if (a >= b || (a == 2 && b == 3)) {
      printf("YES\n");
    } else if (a == 1 || a == 2 || a == 3) {
      printf("NO\n");
    } else
      printf("YES\n");
  }
  return 0;
}
