#include <bits/stdc++.h>
using namespace std;

int main(){
  int N;
  vector<int>a(3);
  cin >> N;
  for(int i=0;i<N;i++){
    cin >>a.at(0)>>a.at(1)>>a.at(2);
    //cout <<a.at(0)<<a.at(1)<<a.at(2)<<endl;
    sort(a.begin(),a.end());
    if((a.at(0)*a.at(0)+a.at(1)*a.at(1))==a.at(2)*a.at(2)){
      cout <<"YES"<<endl;
    }
    else{
      cout <<"NO"<<endl;
    }
    //cout <<a.at(0)*a.at(0)<< a.at(1)*a.at(1)<<a.at(2)*a.at(2)<<endl;
  }
    return 0;
}
