/* -*- coding: utf-8 -*- * * 1509.cc: No.1509 Swap!! - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_N = 10000; /* typedef */ typedef long long ll; /* global variables */ /* subroutines */ template T gcd(T m, T n) { // m > 0, n > 0 if (m < n) swap(m, n); while (n > 0) { T r = m % n; m = n; n = r; } return m; } /* main */ int main() { int tn; scanf("%d", &tn); while (tn--) { ll n, a, b; scanf("%lld%lld%lld", &n, &a, &b); if (gcd(a, b) == 1 && a - 1 <= n - b) puts("YES"); else puts("NO"); } return 0; }