#include <bits/stdc++.h>
using namespace std;
int t, n;
int v[200005];
int dist = 1000000007;
void clear() {
  for (int i = 0; i <= 200000; i++) v[i] = -1;
}
int x, y;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> t;
  while (t--) {
    cin >> x >> y;
    if (x < 4) {
      if (x == 1 && y != 1) {
        cout << "NO\n";
      } else if (x == 2 && y > 3)
        cout << "NO\n";
      else if (x == 3 && y > 3)
        cout << "NO\n";
      else {
        cout << "YES\n";
      }
    } else
      cout << "YES\n";
  }
  return 0;
}
