#include <algorithm>
#include <cmath>
#include <iostream>

auto main() -> int {
    int nInputs;
    std::cin >> nInputs;

    double lens[3];
    for (int i = 0; i < nInputs; i++) {
        std::cin >> lens[0] >> lens[1] >> lens[2];

        std::sort(std::begin(lens), std::end(lens));
        
        if (std::sqrt(std::pow(lens[0], 2) + std::pow(lens[1], 2)) == lens[2]) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}