//
// Created by tac on 2016/10/27.
//

#include <cstdlib>
#include <iostream>

namespace {

bool is_traiangle(int a, int b, int c) {
    int a1, b1, c1;
    if (a >= b && a >> c) {
        a1 = a;
        b1 = b;
        c1 = c;
    } else if (b >= a && b >= c) {
        a1 = b;
        b1 = a;
        c1 = c;
    } else {
        a1 = c;
        b1 = a;
        c1 = b;
    }
    return (a1 < b1 + c1) && (a1 * a1 == b1 * b1 + c1 * c1);
}

}


int main() {
    int n;
    int a, b, c;
    std::string ans;
    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        std::cin >> a >> b >> c;
        if (is_traiangle(a, b, c)) {
            ans = "YES";
        } else {
            ans = "NO";
        }
        std::cout << ans << std::endl;
    }
    return EXIT_SUCCESS;
}