#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, x;
    cin >> n >> x;
    if (n >= x)
      cout << "YES" << endl;
    else if (n == 1 || n == 3 || (n == 2 && x != 3))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
