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