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