#include <iostream>
bool Check(int length[3]);

int main(void)
{
    int dataCount;
    std::cin >> dataCount;
    while(dataCount--){
        int length[3];
        std::cin >> length[0] >> length[1] >> length[2];
        std::cout << (Check(length) ? "YES" : "NO") << std::endl;
    }
    return 0;
}

bool Check(int length[3])
{
    int z = length[0] > length[1] ? (length[0] > length[2] ? 0 : 2) : (length[1] > length[2] ? 1 : 2);
    int buffer = 0;
    for(int i=0;i < 3;++i){
        if(i != z){
            buffer += length[i] * length[i];
        }
    }
    return buffer == length[z] * length[z];
}