#include <iostream>

int main()
{
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    int N, a, b, c;
    std::cin >> N;
    for (int i = 0; i < N; ++i) {
        std::cin >> a >> b >> c;
        if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b)
            std::cout << "YES" << std::endl;
        else
            std::cout << "NO" << std::endl;
    }
}

