#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
void solve() {
  long long int a, b;
  cin >> a >> b;
  if (a == 1 && b > 1) {
    cout << "NO";
    return;
  }
  if (a == 2 && b > 3) {
    cout << "NO";
    return;
  }
  if (a == 3 && b > 3) {
    cout << "NO";
    return;
  }
  cout << "YES";
  return;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t;
  cin >> t;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}
