#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2 * 1e5 + 10;
ll n, t, a[N], x, y;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> t;
  while (t--) {
    cin >> x >> y;
    ll first = 0;
    if (y == x || y < x || y == 1) first = 1;
    if (x == 2 && y == 3) first = 1;
    if ((x == 3 || x == 2 || x == 1) && (!first))
      cout << "NO\n";
    else
      cout << "YES\n";
  }
  return 0;
}
