#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int k = 0; k < t; k++) {
    int x, y, d = 0;
    cin >> x >> y;
    if (x >= y || x > 3) {
      cout << "YES" << endl;
      d = 1;
    }
    if (d == 0) {
      if (x == 1) {
        cout << "NO" << endl;
      } else {
        if (y > 3) {
          cout << "NO" << endl;
        } else {
          cout << "YES" << endl;
        }
      }
    }
  }
}
