1 #include<stdio.h> 2 3 int main() 4 { 5 int n,a,b; 6 while(~scanf("%d",&n)) 7 { 8 while(n--) 9 { 10 scanf("%d%d",&a,&b); 11 if(a%b) 12 printf("NO "); 13 else 14 printf("YES "); 15 } 16 } 17 }
1 #include<stdio.h> 2 3 int main() 4 { 5 int n,a,b; 6 while(~scanf("%d",&n)) 7 { 8 while(n--) 9 { 10 scanf("%d%d",&a,&b); 11 if(a%b) 12 printf("NO "); 13 else 14 printf("YES "); 15 } 16 } 17 }