#include<iostream>
#include<algorithm>
#include<math.h>
#include<string>
using namespace std;

int main()
{
  int n,a[1000],b[1000],c[1000],m;
  string ans[1000];

  cin>>n;
  for(int i=0; i<n; i++)
    cin>>a[i]>>b[i]>>c[i];
    
  for(int i=0; i<n; i++){
    m = max(a[i],b[i]);
    m = max(m,c[i]);
    if(m == a[i]){
      if(a[i] * a[i] == b[i] * b[i] + c[i] * c[i])
	ans[i] = "YES";
      else
	ans[i] = "NO";
      continue;
    }
    if(m == b[i]){
      if(b[i] * b[i] == a[i] * a[i] + c[i] * c[i])
	ans[i] = "YES";
      else
	ans[i] = "NO";
      continue;
    }
    if(m == c[i]){
      if(c[i] * c[i] == a[i] * a[i] + b[i] * b[i])
	ans[i] = "YES";
      else
	ans[i] = "NO";
    }
  }

  for(int i=0; i<n; i++)
    cout<<ans[i]<<endl;

  return 0;
}