#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int a, b;
    cin >> a >> b;
    if (a >= b) {
      cout << "YES\n";
    } else if (a == 2 && b == 3) {
      cout << "YES\n";
    } else if (a <= 3) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
    }
  }
}
