#include <bits/stdc++.h>
using namespace std;
void solve() {
  int l, r;
  cin >> l >> r;
  {
    int a = r + 1;
    int r = l % a;
    if (l >= (a + 1) / 2) {
      cout << "YES\n";
      return;
    }
  }
  {
    int lo = 2;
    int hi = l - 1;
    int best = 2;
    while (lo <= hi) {
      int mid = (lo + hi) >> 1;
      int rem = l % mid;
      if (rem >= (mid + 1) / 2) {
        best = mid;
        lo = mid + 1;
      } else {
        hi = mid - 1;
      }
    }
    if (l / best == r / best) {
      cout << "YES\n";
      return;
    }
  }
  cout << "NO\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
