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