#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, l, r;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> r >> l;
    if (l % (r * 2) >= (r * 2) / 2 && r * 2 > l) {
      cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
}
