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