#include <bits/stdc++.h>
using namespace std;
namespace solution {
void solve() {
  int l, r;
  cin >> l >> r;
  int v = r + 1;
  if (l < v / 2.0)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
}
}  // namespace solution
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  cin >> T;
  while (T--) solution::solve();
  return 0;
}
