#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
void solve() {
  long long l, r;
  cin >> l >> r;
  if (l <= r / 2) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1, i, j;
  cin >> t;
  for (i = 0; i < t; i++) {
    solve();
  }
}
