#include <bits/stdc++.h>
using namespace std;
bool cmp(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second > b.second);
}
void solve() {
  int a, b;
  cin >> a >> b;
  if (a == b) {
    cout << "YES" << endl;
  } else if (a > 3) {
    cout << "YES" << endl;
  } else if (a == 2 && b == 3) {
    cout << "YES" << endl;
  } else if (a > b) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
}
