#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using dl = double;
using ull = unsigned long long;
const int N = 3e5 + 10;
ll aarray[N];
ll magic[510][510];
vector<ll> primes;
bool check[1000001];
ll vis[N];
map<ll, ll> mp;
void solve() {
  ll i, j, n, m, k, l, sum = 0, ans;
  string str;
  bool yes = true;
  vector<ll> v;
  ll r;
  cin >> l >> r;
  r += 1;
  if (r % 2) {
    r++;
  }
  if (l % r < r / 2) {
    cout << "NO" << endl;
  } else
    cout << "YES" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string str;
  ll i, j, n, m, k, t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
