#include #include #include #include #include #include #include #include #define LL long long #define pr pair < int, int > using namespace std; LL m,n,a,b,c; int main() { int T;scanf("%d",&T); while(T--){ scanf("%I64d%I64d%I64d",&a,&b,&c); LL x=sqrt(b*b-4*a*c); if(x*x==b*b-4*a*c)puts("YES"); else puts("NO"); } return 0; }