#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int M = 1e6 + 10;
const long long INF = 0x3f3f3f3f3f3f3f;
const int inf = 0x3f3f3f;
const double esp = 1e-6;
long long read() {
  long long x = 0;
  long long k = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') k = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + (c - '0');
    c = getchar();
  }
  return x * k;
}
int n;
int a[N];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b;
    cin >> a >> b;
    if (a == 1) {
      if (b <= 1) {
        cout << "YES" << endl;
      } else
        cout << "NO" << endl;
    } else if (a == 2) {
      if (b <= 3) {
        cout << "YES" << endl;
      } else
        cout << "NO" << endl;
    } else if (a == 3) {
      if (b <= 3) {
        cout << "YES" << endl;
      } else
        cout << "NO" << endl;
    } else
      cout << "YES" << endl;
  }
}
