#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int N = 2e5;
const long long int inf = 1e18;
long long int add(long long int a, long long int b) {
  long long int res = (a + b) % mod;
  return (res < 0) ? res + mod : res;
}
long long int mul(long long int a, long long int b) {
  long long int res = (a * 1LL * b) % mod;
  return (res < 0) ? res + mod : res;
}
bool compare(long long int x, long long int y) { return x > y; }
struct Compare {
  bool operator()(pair<long long int, long long int> A,
                  pair<long long int, long long int> B) {
    return A.first > B.first;
  }
};
struct tri {
  long long int x, y, z;
};
struct cmp {
  bool operator()(tri a, tri b) {
    if (a.x == b.x) return a.y > b.y;
    return a.x < b.x;
  }
};
bool comp(pair<long long int, long long int> a,
          pair<long long int, long long int> b) {
  if (a.first > b.first)
    return true;
  else if (a.first == b.first)
    return a.second < b.second;
  else
    return false;
}
long long int binarySearch(vector<long long int> nums, long long int lo,
                           long long int hi, long long int target) {
  while (lo < hi) {
    long long int mid = (lo + hi) / 2;
    if (nums[mid] <= target) {
      lo = mid + 1;
    } else {
      hi = mid;
    }
  }
  return lo;
}
void solve() {
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int n;
    long long int l, r;
    cin >> l >> r;
    if (2 * l > r)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
