#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  vector<int> edge(3);
  scanf("%d",&n);
  for(int i=0;i<n;++i){
    scanf("%d %d %d",&edge[0],&edge[1],&edge[2]);
    sort(edge.begin(),edge.end());
    printf("%s\n",edge[0]*edge[0]+edge[1]*edge[1]==edge[2]*edge[2] ? "YES" : "NO");
  }
  return 0;
}