#include <iostream>

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

