#include #include long long a, b, c, d; int t; double sd; bool eps(double x) { if (x <= 0.000001) return true; return false; } int main() { scanf("%d", &t); for (int i = 0; i < t; ++i) { scanf("%I64D%I64D%I64D", &a, &b, &c); d = b * b - 4 * a * c; sd = sqrt(d); if (eps(sd-int(sd))) printf("YES\n"); else printf("NO\n"); } }