#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    if (a == 1 && b > 1)
      printf("NO\n");
    else if (a <= 3 && b > 3)
      printf("NO\n");
    else {
      printf("YES\n");
    }
  }
  return 0;
}
