#include <iostream>

bool isRightTriangle(int a, int b, int c);

int main()
{
    int n;
    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        int a, b, c;
        std::cin >> a >> b >> c;
        if (isRightTriangle(a, b, c)) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
}

bool isRightTriangle(int a, int b, int c)
{
    if (a > b && a > c) {
        return a * a == b * b + c * c;
    } else if (b > a && b > c) {
        return b * b == c * c + a * a;
    } else {
        return c * c == a * a + b * b;
    }
}