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\n"); 13 else 14 printf("YES\n"); 15 } 16 } 17 }