#include <bits/stdc++.h>
using namespace std;
long long int HRX = 1e18;
long long int INF = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int t;
  cin >> t;
  for (long long int i = 0; i < t; i++) {
    long long int x, y;
    cin >> x >> y;
    if (x >= y)
      cout << "YES" << endl;
    else if (x == 3 || x == 1 || (x == 2 && y > 3))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
