#include <bits/stdc++.h>

bool isRightTriangle(const int &a, const int &b, const int &c)
{
    int sum = a * a + b * b + c * c;
    int max = std::max(a, std::max(b, c));
    return (sum - (max * max) == max * max);


}

int main()
{
    int N, a, b, c;
    std::scanf("%d", &N);
    for (int i = 0; i < N; i++) {
        std::scanf("%d %d %d", &a, &b, &c);
        (isRightTriangle(a, b, c)) ? std::cout << "YES" << std::endl : std::cout << "NO" << std::endl;
    }
    return 0;
}

