标签:
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; cin>>t; while(t--) { int m,n; cin>>m>>n; int p=gcd(m,n); if(p==1) cout<<"NO"<<endl; else cout<<"YES"<<endl; } return 0; }
标签:
原文地址:http://www.cnblogs.com/xinxiangqing/p/4737967.html