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