#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    if ((x == 1 || x == 2 && 3 < y || x == 3 && x < y) && x != y) {
      cout << "NO" << endl;
    } else
      cout << "YES" << endl;
  }
}
