标签:
Description
Input
Output
Sample Input
Sample Output
#include<iostream> using namespace std; int gcd(int a,int b){ return b==0?a:gcd(b,a%b); } int main(){ int t,n,m;cin>>t; while(t--){ cin>>m>>n; if(m==1)cout<<"NO"<<endl; else { if(gcd(n,m)==1)cout<<"NO"<<endl; else cout<<"YES"<<endl; } } return 0; }
标签:
原文地址:http://www.cnblogs.com/demodemo/p/4749047.html