#include <iostream>
 
int main()
{
    int x, a, b, c; // put space after ","
    std::cin >> x;
    for (int i = 0; i < x;i++) { // put space after ";" and after ")"
        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 {              // indent is like this;this "}" ends "if () {" structure.
                              // put space at both sides of "else"
            std::cout << "NO" << std::endl;
        } // indent is like this; this "}" ends "else {" structure
    } // indent is like this.
    return 0;
}