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