#include <bits/stdc++.h>
using namespace std;
long long i, j, k, l, n, m, a, b, x;
int main() {
  int nt;
  cin >> nt;
  while (nt--) {
    cin >> a >> b;
    if (a == 1 && b != 1) {
      cout << "NO" << '\n';
      continue;
    }
    if (a < 4 && b > 3)
      cout << "NO" << '\n';
    else
      cout << "YES" << '\n';
  }
  exit(0);
}
