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