#include <bits/stdc++.h>
using namespace std;
int t;
int main(void) {
  cin >> t;
  int n, x, a, b;
  while (t--) {
    cin >> a >> b;
    if (a >= b) {
      cout << "YES" << endl;
      continue;
    } else {
      if (a == 3) {
        cout << "No" << endl;
        continue;
      }
      if (a == 1) {
        cout << "No" << endl;
        continue;
      }
      if (a == 2) {
        if (b == 3) {
          cout << "Yes" << endl;
          continue;
        }
        cout << "No" << endl;
        continue;
      }
      cout << "Yes" << endl;
    }
  }
  return 0;
}
