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