#include #include typedef long long ll; int main() { int t; ll a, b, c; scanf("%d", &t); while (t--) { scanf("%I64d %I64d %I64d", &a, &b, &c); ll delt = b * b - 4 * a * c; if (sqrt(delt) * sqrt(delt) == delt) puts("YES"); else puts("NO"); } return 0; }