#include using namespace std; int Q, N, M; int main() { cin >> Q; while(Q--) { cin >> N >> M; if((N - 1) % (M + 1) == 0) cout << "NO" << endl; else cout << "YES" << endl; } return 0; }