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