#include #include #include #include using namespace std; typedef long long ll; int main() { int t; ll a,b,c,x; scanf("%d",&t); while(t--) { scanf("%I64d %I64d %I64d",&a,&b,&c); if((b*b-4*a*c)<0) { printf("NO\n"); continue; } else { x=sqrt(b*b-4*a*c); if(x*x!=(b*b-4*a*c)) printf("NO\n"); else printf("YES\n"); } } return 0; }