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