#include<iostream>
#include <cstdio>
#include<cmath>
#include<vector>
#include<algorithm>

using namespace std;

////Nayeem Shahriar Joy,Applied Physics &Electronic Engineering,University of Rajshahi.

int main()

{
    vector<int>p;
   int t,a,b,c,d;
   cin>>t;
   while(t--)
   {
       for(int i=0;i<3;i++){
       cin>>a;
       p.push_back(a);
       }
       sort(p.begin(),p.end());
       b=p[0]*p[0];
       c=p[1]*p[1];
       d=p[2]*p[2];
       if(b+c==d)
       {
           cout<<"YES"<<endl;
       }
       else{
        cout<<"NO"<<endl;
       }
       p.clear();
   }
   return 0;
}