#include <bits/stdc++.h>
using namespace std;
vector<long long> ft(1, 1LL);
void solve() {
  int a, b;
  cin >> a >> b;
  if (a <= 3 and b > a and !(a == 2 and b == 3))
    cout << "NO\n";
  else
    cout << "YES\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
