#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int t;
int l, r;
void solve() {
  scanf("%d%d", &l, &r);
  int div = (r + 1);
  if (div % 2) {
    puts((l > div / 2 ? "YES" : "NO"));
  } else {
    puts((l >= div / 2 ? "YES" : "NO"));
  }
}
int main() {
  scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}
