#include <bits/stdc++.h>
// #include "bits/stdc++.h"

#define pout(n)  printf ("%d\n", n)

#define rep(i,a,n) for (int i = a;i < n;i++)
#define per(i,n,a) for (int i = n-1;i >= a;i--)

const int d4x[4] = {1, 0, -1, 0};
const int d4y[4] = {0, 1, 0, -1};
const int d8x[8] = { 1,1,0,-1,-1,-1,0,1 };
const int d8y[8] = { 0,1,1,1,0,-1,-1,-1 };
 
typedef long long ll;
using namespace std;
 
int main() {
  int n;
  cin >> n;
  int a[n],b[n],c[n];
  
  rep(i,0,n){
    cin >> a[i] >> b[i] >> c[i];
  }

  rep(i,0,n){
    if(a[i] < b[i]){
      swap(a[i],b[i]);
    }
    if(a[i] < c[i]){
      swap(a[i],c[i]);
    }
    if(pow(a[i],2) == pow(b[i],2)+pow(c[i],2)){
      puts("YES");
    }
    else{
      puts("NO");
    }
  }
  return 0;
}
