#include <iostream>

int main()
{
        int a[3], n, t;
        std::cin >> n;
        for(int i = 0; i < n; ++i)
        {
                std::cin >> a[0] >> a[1] >> a[2];
                int max_index=0;
                for(int j = 1; j < 3; ++j)
                        if(a[max_index] < a[j])
                                max_index = j;
                t = 0;
                for(int j = 0; j < 3; ++j)
                        if(j != max_index)
                                t += a[j]*a[j];
                if(t == (a[max_index]*a[max_index]))
                        std::cout << "YES" << std::endl;
                else
                        std::cout << "NO" << std::endl;
        }
        return 0;
}