#include <iostream> 
#include <math.h> 
#include <iomanip> 
using namespace std;  
  
int main()  
{  
int num,a,b,c;
cin >> num;
for(int i=1;i<=num;i++)
{cin >> a >> b >> c;
if(a <= b && b <= c && a*a+b*b==c*c)
{cout << "YES" << endl;}
else if(a <= c && c <= b && a*a+c*c==b*b)
{cout << "YES" << endl;}
else if(b <= a && a <= c && a*a+b*b==c*c)
{cout << "YES" << endl;}
else if(c <= a && a <= b && a*a+c*c==b*b)
{cout << "YES" << endl;}
else if(b <= c && c <= a && b*b+c*c==a*a)
{cout << "YES" << endl;}
else if(c <= b && b <= a && b*b+c*c==a*a)
{cout << "YES" << endl;}
else
{cout << "NO" << endl;}
}
} 

