#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) {
      puts("YES");
      continue;
    }
    if (x == 1 || x == 3)
      puts("NO");
    else if (x == 2 && y != 3)
      puts("NO");
    else
      puts("YES");
  }
  return 0;
}
