#include <bits/stdc++.h>
using namespace std;
const long long Min = -1e4;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long X, Y;
    cin >> X >> Y;
    if (X >= 4)
      cout << "YES" << endl;
    else if (X == 2 || X == 3)
      cout << (Y <= 3 ? "YES" : "NO") << endl;
    else if (X == 1)
      cout << (Y <= 1 ? "YES" : "NO") << endl;
    else
      assert(false);
  }
}
