#include <iostream>
#include <cmath>

int main(int argc, const char *argv[]) {
    int n;
    std::cin >> n;
    int a, b, c, a2, b2, c2;
    for (int i = 0; i < n && std::cin >> a >> b >> c; i++) {
        a2 = a * a;
        b2 = b * b;
        c2 = c * c;
        if (a2 == b2 + c2 || b2 == c2 + a2 || c2 == a2 + b2) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}