#include #include #include #include #include #include #include #include #include #include #include #define eps 1e-5 #define inf 0x3f3f3f3f #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) #define lson l,m,rt<<1 #define rson m+1,r,rt<<1 | 1 #define lc rt<<1 #define rc rt<<1 | 1 #define getx2(a) ((a)*(a)) #define Pi acos(-1.0) #define N 100010 typedef long long LL; using namespace std; int main() { int t; scanf("%d",&t); LL a,b,c; while(t--) { scanf("%I64d%I64d%I64d",&a,&b,&c); LL det=b*b-4*a*c; LL n=(LL)sqrt(det+0.0); if(n*n!=det) { printf("NO\n"); continue; } else { int aa=-b+n; int bb=-b-n; if(aa<0&&bb<0) { printf("YES\n"); continue; } else { printf("NO\n"); } } } return 0; }