#include <bits/stdc++.h>
using namespace std;
int dx[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dy[] = {-1, 0, 1, -1, 1, -1, 0, 1};
int dx1[] = {-1, 0, 0, 1};
int dy1[] = {0, -1, 1, 0};
vector<vector<int> > adj;
vector<bool> visited;
void dfs(int v) {
  visited[v] = true;
  for (int u : adj[v]) {
    if (!visited[u]) dfs(u);
  }
}
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
bool isprime(long long n) {
  if (n == 1) return false;
  if (n == 2 || n == 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i += 6) {
    if ((n % i == 0) || (n % (i + 2) == 0)) return false;
  }
  return true;
}
long long binpow(long long a, long long b) {
  if (b == 0) return 1;
  long long res = binpow(a, b / 2);
  if (b % 2)
    return res * res * a;
  else
    return res * res;
}
long long ncr(long long x, long long y) {
  long long ans = 1;
  for (long long i = 1; i <= y; ++i) {
    ans *= (x - y + i);
    ans /= i;
  }
  return ans;
}
long long phi(long long n) {
  long long result = n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  cin >> t;
  for (int g = 0; g < t; ++g) {
    long long x, y;
    cin >> x >> y;
    if ((y - x) < x)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
