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