#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
long long expo(long long a, long long b) {
  if (b == 0) return 1;
  if (b % 2 == 0) {
    long long ret = expo(a, b / 2);
    ret = (ret * ret) % 1000000007;
    return ret;
  } else {
    long long ret = expo(a, b / 2);
    ret = (ret * ret) % 1000000007;
    ret = (ret * a) % 1000000007;
    return ret;
  }
}
bool is_prime(long long x) {
  if (x == 1) return false;
  for (long long i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
int arr[200005], sze[200005];
int root(int i) {
  while (arr[i] != i) i = arr[arr[i]];
  return i;
}
void unionn(int u, int v) {
  int a = root(u);
  int b = root(v);
  if (a == b) return;
  if (sze[a] > sze[b]) swap(a, b);
  arr[a] = arr[b];
  sze[b] += sze[a];
}
long long inf = 1e18;
int main() {
  int t, x, y;
  cin >> t;
  while (t--) {
    cin >> x >> y;
    if (y <= x)
      cout << "YES" << endl;
    else {
      if (x == 1)
        cout << "NO" << endl;
      else {
        if (x <= 3 && y > 3)
          cout << "NO" << endl;
        else
          cout << "YES" << endl;
      }
    }
  }
}
