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