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