#include <bits/stdc++.h>
using namespace std;
int gcd(int r, int p) {
  if (p == 0) return r;
  return gcd(p, r % p);
}
int main() {
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int x, y;
    cin >> x >> y;
    if (x == 1 && y > 1) {
      cout << "NO\n";
    } else {
      if (x < y) {
        if (x <= 3 && y >= 4)
          cout << "NO\n";
        else {
          cout << "YES\n";
        }
      } else {
        cout << "YES\n";
      }
    }
  }
  return 0;
}
