#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  int t;
  cin >> t;
  for (int tt = 0; tt < t; tt++) {
    int l, r;
    cin >> l >> r;
    int half = (r + 2) / 2;
    cout << (l >= half ? "YES" : "NO") << endl;
  }
}
