#include <bits/stdc++.h>
using namespace std;
int main(){
  long long n,a,b,c;
  cin >> n;
  long long tmp[3];
  for(int i=0;i<n;i++){
    cin >> a >> b >> c;
    tmp[0]=a;tmp[1]=b;tmp[2]=c;
    sort(tmp,tmp+3);
    if(tmp[0]*tmp[0]+tmp[1]*tmp[1]==tmp[2]*tmp[2]){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
  return 0;
}

