#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[n],a2;
  int b[n],b2;
  int c[n],c2;
  int ans,ans2;
  for(int i=0;i<n;i++){
    cin >> a[i] >> b[i] >> c[i];
    int m[] = {a[i],b[i],c[i]};
    sort(m,m+3,greater<int>());
    a2 = m[0];
    b2 = m[1];
    c2 = m[2];
    ans = a2 * a2;
    ans2 = b2 * b2 + c2 * c2;
    if(ans==ans2){
      cout << "YES" <<endl;
    }
    else cout << "NO" <<endl;
  }
  return 0;
}