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