#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 10;
void print_case() {
  static int cnt = 0;
  printf("Case #%d: ", ++cnt);
}
int l, r;
void solve() {
  scanf("%d%d", &l, &r);
  if (r < 2 * l) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
}
int main() {
  int casen = 1;
  scanf("%d", &casen);
  while (casen--) solve();
  return 0;
}
