#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7, maxn = 2e5 + 20;
int n, k, m, x, y, q, a[maxn], b[maxn], cnt[maxn << 2];
int ans;
int32_t main() {
  cin >> q;
  for (int j = 0; j < q; j++) {
    cin >> x >> y;
    if (x == 1 && y != 1)
      cout << "NO" << endl;
    else if (x == 2 && y > 3)
      cout << "NO" << endl;
    else if (x == 3 && y > 3)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
