#include <bits/stdc++.h>
using vi = std::vector<long long int>;
using vvi = std::vector<vi>;
using pii = std::pair<long long int, long long int>;
using vpii = std::vector<pii>;
using vvpii = std::vector<vpii>;
using namespace std;
const long long int N = 2e6 + 10;
const long long int inf = 1e18 + 10;
const long double Pi = 3.14159265;
void solve() {
  long long int l, r;
  cin >> l >> r;
  if ((l) > (r / 2))
    cout << "YES";
  else
    cout << "NO";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long int xx = 0;
  long long int t;
  cin >> t;
  while (t--) {
    ;
    solve();
    cout << endl;
  }
  return 0;
}
