#include<iostream>
#include<set>

int main(){
        int n,a,b,c;
        std::cin >> n;
        for(int i=0;i<n;i++){
                std::cin >> a >> b >> c;
                std::multiset<int> st;
                st.insert(a);
                st.insert(b);
                st.insert(c);
                std::multiset<int>::iterator itr=st.begin();
                a = *itr; a = a*a;itr++;
                b = *itr; b = b*b;itr++;
                c = *itr; c = c*c;itr++;
                if(a+b == c) std::cout << "YES" << std::endl;
                else std::cout << "NO" << std::endl;
        }
        return 0;
}