Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i:=0; i<n; i++{
	    data := nextInts(3)
	    sort.Ints(data)
	    if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
	        fmt.Fprintln(out, "YES")
	    }else{
	        fmt.Fprintln(out, "NO")
	    }
	}
}

func next() string{
	sc.Scan()
	return sc.Text()
}

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

C++: // Define
#define     ERROR_NUMBER     -1


// Prototype

// 順列検索関数 (find_min_number)
// n個の整数列 inputnumbers の中で一番小さい数字からk番目の整数を返します
// const int *inputnumbers, const unsigned int n, const unsigned int k
int find_min_number(const int *inputnumbers,const unsigned int n,const unsigned int k);

// 順列検索関数 (find_min_number)
// n個の整数列 inputnumbers の中で一番大きい数字からk番目の整数を返します
// const int *inputnumbers, const unsigned int n, const unsigned int k
int find_max_number(const int *inputnumbers,const unsigned int n,const unsigned int k);



// IncludingHeaderFile
#include<iostream>
#include<vector>


// UsingNamespace
using namespace std;


// Functions

// 順列検索関数 (find_min_number)
// n個の整数列 inputnumbers の中で一番小さい数字からk番目の整数を返します
// const int *inputnumbers, const unsigned int n, const unsigned int k
int find_min_number(const int *inputnumbers,const unsigned int n,const unsigned int k){
	int i,j;
	bool flag;
	vector <int> numbers;

	// 引数の誤りをチェック
	if((n < k) || (n <= 0) || (k <= 0)){
		return ((int)ERROR_NUMBER);
	}

	// inputnumbers -> numbers (コピー)
	for(i=0;i < ((int)n);i++){
		numbers.push_back(*(inputnumbers + i));
	}

	// 並び替えのループ
	do{
		flag = false;
		for(i=0;i < (((int)n) - 1);i++){
			if(numbers[i] > numbers[i+1]){
				j = numbers[i];
				numbers[i] = numbers[i+1];
				numbers[i+1] = j;
				flag = true;
			}
		}
	}while(flag == true);

	// 小さいほうからk番目の整数を返す
	return numbers[(k - 1)];
}

// 順列検索関数 (find_min_number)
// n個の整数列 inputnumbers の中で一番大きい数字からk番目の整数を返します
// const int *inputnumbers, const unsigned int n, const unsigned int k
int find_max_number(const int *inputnumbers,const unsigned int n,const unsigned int k){
	int i,j;
	bool flag;
	vector <int> numbers;

	// 引数の誤りをチェック
	if((n < k) || (n <= 0) || (k <= 0)){
		return ((int)ERROR_NUMBER);
	}

	// inputnumbers -> numbers (コピー)
	for(i=0;i < ((int)n);i++){
		numbers.push_back(*(inputnumbers + i));
	}

	// 並び替えのループ
	do{
		flag = false;
		for(i=0;i < (((int)n) - 1);i++){
			if(numbers[i] < numbers[i+1]){
				j = numbers[i];
				numbers[i] = numbers[i+1];
				numbers[i+1] = j;
				flag = true;
			}
		}
	}while(flag == true);

	// 大きいほうからk番目の整数を返す
	return numbers[(k - 1)];
}




#define     MAX_NUMBER     1000
#define     MIN_LENGTH     1
#define     MAX_LENGTH     1000

int main(){
	int n,i;
	int num[3];
	int p,q,r;												// p <= q <= r

	// データ数の入力
	cin >> n;
	if((n <= 0) || (n > ((int)MAX_NUMBER))){
		cerr << "Error : The number is wrong." << endl;
		return -1;
	}

	// データの入力・チェック・並び替え・出力
	for(i=0;i<n;i++){
		// データの入力
		cin >> num[0] >> num[1] >> num[2];
		// データのチェック
		if((num[0] < ((int)MIN_LENGTH)) || (num[0] > ((int)MAX_LENGTH))){
			cerr << "Error : The first number is wrong." << endl;
			return -1;
		}else if((num[1] < ((int)MIN_LENGTH)) || (num[1] > ((int)MAX_LENGTH))){
			cerr << "Error : The first number is wrong." << endl;
			return -1;
		}else if((num[2] < ((int)MIN_LENGTH)) || (num[2] > ((int)MAX_LENGTH))){
			cerr << "Error : The first number is wrong." << endl;
			return -1;
		}
		// データの並び替え
		p = find_min_number(num,3,1);
		q = find_min_number(num,3,2);
		r = find_min_number(num,3,3);
		// 出力
		if(((p * p) + (q * q)) == (r * r)){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}

	return 0;
}

C++: //	??´?§?????§???¢ 
#include<iostream>
using namespace std;

int main() {
	int a,b,c,n;
	cin >> n;
	for ( int i=0; i < n; i++ ){
		bool flag = false;
		cin >> a >> b >> c;
		if (a + b > c && a + c > b && b + c > a){
			if ( ((a*a + b*b) == c*c) ||  ((a*a + c*c) == b*b) || ((b*b + c*c) == a*a) ){
				flag = true;
			}
		}
		if (flag) {
			cout << "yes" << endl;
		}else {
			cout << "no" << endl;
		}
	}
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
	int N;
	int count=0;
	int a[3];
	scanf("%d ",&N);
	while(count!=N){
	for(int i=0;i<3;i++){
		scanf("%d ",&a[i]);
	}
	sort(a,a+3);
	if(a[2]<(a[0]+a[1])){
		printf("YES");
		count++;
	}
	else{
		printf("NO");
		count++;
	}
	}
	return 0;
	}

C++: #include<stdio.h>
int main(void)
{
	int n,a,b,c,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
		if(a>b&&a>c){
			if(b*b+c*c==a*a){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
		if(b>a&&b>c){
			if(a*a+c*c==b*b){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
		if(c>a&&c>b){
			if(a*a+b*b==c*c){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
		if(a==b&&a==c){
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include <iostream>
bool Check(int length[3]);

int main(void)
{
    int dataCount;
    std::cin >> dataCount;
    while(dataCount--){
        int length[3];
        std::cin >> length[0] >> length[1] >> length[2];
        std::cout << (Check(length) ? "YES" : "NO") << std::endl;
    }
    return 0;
}

bool Check(int length[3])
{
    int z = length[0] > length[1] ? (length[0] > length[2] ? 0 : 2) : (length[1] > length[2] ? 1 : 2);
    int buffer = 0;
    for(int i=0;i < 3;++i){
        if(i != z){
            buffer += length[i] * length[i];
        }
    }
    return buffer == length[z] * length[z];
}

C++: #include <iostream>
using namespace std;
int main(){
	int a,b,c,N;
	cin>>N;
	for(int i=1;i<=N; i++){
		cin>>a>>b>>c;
		if(a*a+b*b==c*c){
			cout<<"Yes"<<endl;
		}else{
			cout<<"No"<<endl;
		}
	}

}

C++: #include<stdio.h>
int main(void)
{
	int N=0;
	int a=0,b=0,c=0;
	int soto=0;
	int i=0;
	scanf("%d",&N);
	for (i=1;i<=N;i++)
	{
		scanf("%d %d %d",&a,&b,&c);
		if (a<b)
		{
			soto=a;
			a=b;
			b=soto;
		}
		if (a<c)
		{
			soto=a;
			a=c;
			c=soto;
		}
		if (a*a==b*b+c*c)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>

bool check_right_tri(int a,int b,int c){

  int max = std::max({a,b,c});

  if(max == a && a*a == b*b + c*c)
    return true;
  else if(max == b && b*b == a*a + c*c)
    return true;
  else if(max ==c && c*c == a*a + b*b)
    return true;
  else return false;
}

int main(){
  const int min = 1;
  const int max = 1000;
  const int data_max = 1000;
  int a,b,c,N;
  std::cin >> N;

  for(int i = 0; i < N; ++i){
    std::cin >> a >> b >> c;
    if(check_right_tri(a,b,c))
      std::cout << "YES" << std::endl;
    else
      std::cout << "NO" << std::endl;
  }
  return 0;
}

C++: #include<iostream>
using namespace std;
int dd(int x){
	int y;
	y = x * x;
	return y;
}
int main(){
	int n;
	int a, b ,c;
	cin >> n;
	while(n > 0){
		cin >> a;
		cin >> b;
		cin >> c;
		if((dd(a) + dd(b) == dd(c)) || (dd(b) + dd(c) == dd(a)) || (dd(c) + dd(a) == dd(b))){
			cout << "YES\n";
		}else{
			cout << "NO\n";
		}
		n--;
	}
}

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

#define rep(i,n) for(ll (i)=0;(i)<(ll)(n);(i)++)
#define all(x) (x).begin(),(x).end()
#define MOD 1000000007LL
#define INF (1LL<<60LL)
#define int long long
typedef long long ll;

using namespace std;



signed main() {
	ll n; cin >> n;
	rep(i, n) {
		vector<ll> v(3);
		rep(i, 3) cin >> v[i];
		sort(all(v));
		if (pow(v[0], 2) + pow(v[1], 2) == pow(v[2], 2)) {
			cout << "YES" << endl;
		}
		else cout << "NO" << endl;
	}
}