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