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