#include <bits/stdc++.h>
using namespace std;
inline void YES() { cout << "YES" << endl; }
inline void NO() { cout << "NO" << endl; }
inline int read() {
  int p, data = 0;
  char ch = 0;
  while ((ch != '-') && ch < '0' || ch > '9') ch = getchar();
  if (ch == '-') {
    p = -1;
    ch = getchar();
  } else
    p = 1;
  while (ch >= '0' && ch <= '9') data = data * 10 + ch - '0', ch = getchar();
  return data * p;
}
void solve() {
  long long a, b;
  cin >> a >> b;
  if (a == 1 && b == 1)
    YES();
  else if (a == 2 && b <= 3)
    YES();
  else if (a == 3 && b <= 3)
    YES();
  else if (a > 3)
    YES();
  else
    NO();
}
int main() {
  int n;
  n = 1;
  n = read();
  while (n--) {
    solve();
  }
  return 0;
}
