#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int l, r;
    cin >> l >> r;
    int d = l % (r + 1);
    double dd = (double)(r + 1) / 2;
    if (d >= dd)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
