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

bool JudgeTriangle(int a, int b, int c)
{
    std::vector<int> numbers;
    numbers.push_back(a);
    numbers.push_back(b);
    numbers.push_back(c);
    std::sort(numbers.begin(), numbers.end());
    
    c = numbers[2];
    b = numbers[1];
    a = numbers[0];
    return (a*a+b*b == c*c);
}

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

    return 0;
}

