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