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