#include <bits/stdc++.h>
using namespace std;
using ll = long long;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    ll x, y;
    cin >> x >> y;
    if (x <= 1 && y > x) {
      cout << "NO\n";
    } else if (x <= 3)
      if (y <= 3)
        cout << "YES\n";
      else
        cout << "NO\n";
    else {
      cout << "YES\n";
    }
  }
  return 0;
}
