#include <bits/stdc++.h>
using namespace std;
void solution() {
  int t;
  cin >> t;
  while (t--) {
    int l, r;
    cin >> l >> r;
    int a = r + 1;
    cout << (2 * (l % a) >= a ? "YES" : "NO") << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solution();
  return 0;
}
