
#include <string>
#include <sstream>
#include <iostream>

int main(void) 
{
    std::string str;
    int lens[3];
    int nolines;

    getline(std::cin, str);
    std::istringstream str_s(str);

    str_s >> nolines;

    int i;
    for (i = 0; i < nolines; i++) {
        getline(std::cin, str);
        std::istringstream str_s(str);

        str_s >> lens[0] >> lens[1] >> lens[2];

        std::sort(lens, lens+3);

        if (lens[2] * lens[2] == lens[0] * lens[0] + lens[1] * lens[1]) 
            std::cout << "YES" << std::endl;
        else
            std::cout << "NO"  << std::endl;
    }

    return 0;
}