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