#include<iostream>
#include<algorithm>
using namespace std;

int max(int *a);

int main(){
  int n,tmp[3];
  cin>>n;
  for(int i = 0;i < n;i++){
    cin>>tmp[0]>>tmp[1]>>tmp[2];
    sort(tmp,tmp + 3,greater<int>());
    if(tmp[0]*tmp[0] == tmp[1]*tmp[1] + tmp[2]*tmp[2])cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
return 0;
}