#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, i, l, r, max;
  cin >> n;
  while (n--) {
    cin >> l >> r;
    max = r + 1;
    if ((l % max >= (double)max / 2) && (r % max >= (double)max / 2))
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
}
