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