#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int x, y;
    cin >> x >> y;
    if (x >= y) {
      cout << "YES\n";
      continue;
    } else {
      if (x == 3 || x == 1 || (x == 2 && y >= 4)) {
        cout << "NO\n";
        continue;
      }
    }
    cout << "YES\n";
  }
}
