#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, x, y;
  cin >> t;
  while (t--) {
    cin >> x >> y;
    if (x >= 4)
      printf("YES\n");
    else {
      if (x == 1)
        printf((y == 1) ? "YES\n" : "NO\n");
      else {
        if (y <= 3)
          printf("YES\n");
        else
          printf("NO\n");
      }
    }
  }
  return 0;
}
