#include <bits/stdc++.h>
using namespace std;
void fun() {
  long long int l, r;
  cin >> l >> r;
  if (l % (r + 1) >= (r + 1) / 2.0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    fun();
  }
  return 0;
}
