#include <bits/stdc++.h>
using namespace std;
const int mnx = 1e6 + 9;
long long q, x, y;
int main() {
  cin >> q;
  while (q--) {
    cin >> x >> y;
    if ((x % 2 == 0 && x * 3 / 2 == y) || x == y || x > y) {
      cout << "YES\n";
      continue;
    } else if (x == 3 && y != 3) {
      cout << "NO\n";
    } else if (x == 1 && y != 1) {
      cout << "NO\n";
    } else if (x == 2 && y != 2) {
      cout << "NO\n";
    } else
      cout << "YES\n";
  }
  return 0;
}
