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