#include <bits/stdc++.h>
using namespace std;
void solve() {
  int x, y;
  cin >> x >> y;
  if (y <= x) {
    cout << "YES" << endl;
    return;
  }
  if (x == 2 && y > 3) {
    cout << "NO" << endl;
    return;
  }
  if (x == 1 || x == 3) {
    cout << "NO" << endl;
    return;
  }
  cout << "YES" << endl;
}
int main() {
  int t;
  cin >> t;
  while (t) {
    solve();
    t--;
  }
}
