#include <bits/stdc++.h>
using namespace std;
const long long int N = 2e5 + 5;
void solve() {
  long long int a, b;
  cin >> a >> b;
  if (a >= b) {
    cout << "YES"
         << "\n";
    return;
  } else {
    if (a == 1) {
      cout << "NO"
           << "\n";
      return;
    } else if (a == 2 || a == 3) {
      if (b == 3) {
        cout << "YES"
             << "\n";
        return;
      } else {
        cout << "NO"
             << "\n";
      }
    } else {
      cout << "YES"
           << "\n";
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  cin >> t;
  while (t--) solve();
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
