#include <bits/stdc++.h> using namespace std; int t, n, m; int main() { cin >> t; while (t--) { cin >> n >> m; cout << (n % (m + 1) ? "YES\n" : "NO\n"); } return 0; }