#include #include using namespace std; long gcd(long a,long b){return b?gcd(b,a%b):a;} int T; main() { cin>>T; for(;T--;) { long N,A,B; cin>>N>>A>>B; if(A>B)swap(A,B); if(gcd(A,B)>1) { cout<<"NO"<