#include <bits/stdc++.h>
using namespace std;
const long long int mxn = 1e5 + 1;
string s, s1, s2, s3;
char ch[10000][10000];
int main() {
  long long int tc;
  cin >> tc;
  while (tc--) {
    long long int n, m, i, z, j, a = 0, ans = 0, k = 0, cnt = 0, b;
    long long int c = 0, x, y, d = 0, sum = 0, mn = INT_MAX, mx = 0;
    string ss, strn;
    char ch;
    cin >> n >> k;
    if (n >= k || (n == 2 && k == 3) || n > 3) {
      {
        cout << "YES" << endl;
        continue;
      }
    } else
      cout << "NO" << endl;
  }
  return 0;
}
