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