#include <bits/stdc++.h>
using namespace std;
const int N = int(1e5 + 7);
const int mod = int(1e9 + 7);
const double eps = double(1e-9);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  ;
  while (t--) {
    long long x, y;
    cin >> x >> y;
    ;
    if (x == 1 && y != 1) {
      cout << "NO" << endl;
    } else if (x <= 3 && y > 3) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
  return 0;
}
