#include <iostream>
#include <algorithm>
#include <vector>

int main(void) {
    int n;
    std::vector<int> v(3, 0);

    int max_length;
    std::cin >> n;

    for (int i = 0; i < n; i++) {
        std::cin >> v[0] >> v[1] >> v[2];
        std::sort(v.begin(), v.end());
        if (v[2]*v[2] == v[0]*v[0] + v[1]*v[1]) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}