#include <bits/stdc++.h>
using namespace std;
const long long int N = 200023;
bool vis[N];
long long int color[N] = {0};
vector<long long int> adj[N];
set<long long int> s;
void solve() {
  long long int x, y;
  cin >> x >> y;
  if (x >= y)
    cout << "YES";
  else {
    if (x == 1) {
      cout << "NO";
      return;
    }
    if (x == 2) {
      if (y == 3)
        cout << "YES";
      else
        cout << "NO";
      return;
    }
    if (x == 3) {
      cout << "NO";
      return;
    }
    cout << "YES";
  }
}
int main() {
  long long int T;
  cin >> T;
  long long int t = 0;
  while ((t++) < T) {
    solve();
    cout << endl;
  }
  return 0;
}
