Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"sort"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	nQueries := nextInt()
	for i := 0; i < nQueries; i++ {
		lengths := []int{nextInt(), nextInt(), nextInt()}
		sort.Slice(lengths, func(i, j int) bool { return lengths[i] > lengths[j] })
		if math.Pow(float64(lengths[0]), 2) == math.Pow(float64(lengths[1]), 2)+math.Pow(float64(lengths[2]), 2) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>

using namespace std;

int main()
{
	int a,b,c,n;
	
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a>>b>>c;

		if(a*a+b*b==c*c) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}

}

C++: #include<iostream>
#include<stdio.h>
using namespace std;

int main() {
	int a, b, c, n, t[3], s,ss;
	cin >> n;
	for (n; n > 0; n--) {
		cin >> a >> b >> c;
		 t[0]=a;
		if (t[0] < b) {
			t[1] = t[0];
			t[0] = b;
		}
		else t[1] = b;
		if (t[0] <c) {
			t[2] = t[1];
			t[1] = t[0];
			t[0] = c;
		}else if(t[1] <c) {
			t[2] = t[1];
			t[1] = c;
		}
		else t[2] = c;
		s = t[1] * t[1] + t[2] * t[2];
		ss = t[0] * t[0];
			if (s == ss) {
			cout << "YES"<<endl;
		}else cout << "NO"<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	int n,a,b,c;
	cin >> n;
	for(int i=0;i<n;i++){
		cin >> a >> b >> c;
		if((a*a+b*b==c*c) || (a*a+c*c==b*b) || (c*c+b*b==a*a)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
}

C++: #include <iostream>
using namespace std;

int main()
{
	int n, a[3];
	cin >> n;
	while (cin >> a[0] >> a[1] >> a[2])
	{
		sort(a, a + 3);
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	
	return 0;
}

C++: nt main(){scanf("%*d");for(int a,b,c;~scanf("%d%d%d",&a,&b,&c);puts(b+c-a?a+c-b?a+b-c?"NO":"YES":"YES":"YES")){a*=a;b*=b;c*=c;}}

C++: #include<stdio.h>
int main(void)
{
	int a,s,z,x,h,d,f,g,i,j;
	scanf("%d",&a);
	for(i=1;i<=a;i++){
		scanf("%d %d %d",&s,&z,&x);
		d=x*x;
		h=s*s+z*z;
		if(s<x&&x<z||x<s&&s<z){
			d=z*z;
			h=s*s+x*x;
		}
		if(z<x&&x<s||x<z&&z<s){
			d=s*s;
			h=z*z+x*x;
		}
		if(d==h){
			printf("YES\n");
		}
		if(d!=h){
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include <iostream>

int main() {
int N;
std::cin >> N;

for (int i = 0; i < N; i++) {
int a, b, c;
std::cin >> a >> b >> c;
int aa = a * a;
int bb = b * b;
int cc = c * c;
if (aa + bb == cc) std::cout << "YES" << std::endl;
else
if (aa + cc == bb) std::cout << "YES" << std::endl;
else
if (bb + cc == aa) std::cout << "YES" << std::endl;
else
std::cout << "NO" << std::endl;

}


return 0;
}

C++: #include<iostream>
using namespace std;

int main() {
	int n, a, b, c;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a >> b >> c;
		if (a*a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b)
			cout << "YES\n";
		else
			cout << "NO\n";
	}
	return 0;
}

C++: #include <iostream>
using namespace std ;

bool solve(int x,int y, int z)
{
	if( (x * x) == (y * y + z * z) )
	{
		return true ;
	}

	return false ;
}

int main()
{
	int N ;
	cin >> N ;

	bool ans = false ;

	for( int i = 0 ; i < N ; i ++ )
	{
		int a,b,c ;
		cin >> a >> b >> c ;

		if( a > b )
		{
			if( a > c )		// 最大値はa
			{
				ans = solve(a,b,c) ;
			}
			else if( a < c )	// 最大値はc
			{
				ans = solve(c,a,b) ;
			}
		}
		else if( a < b )
		{
			if( b > c )		// 最大値はb
			{
				ans = solve(b,a,c) ;
			}
			else if( b < c )	// 最大値はc
			{
				ans = solve(c,a,b) ;
			}
		}

		if( ans ){ cout << "YES" << endl ; }
		else{ cout << "NO" << endl ; }
	}
	return 0 ;
}

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

using namespace std;

int main()
{
	int set,i,j;
	cin>>set;
    if(set<=1000)
	{
	int dats[set][3];
	for(i=0; i<set; i++)
	{   
	   for(j=0; j<3; j++)
	   {
	   	   cin>>dats[i][j];	   	   
		   if(dats[i][j]>=1 && dats[i][j]<=1000)
           dats[i][j]=dats[i][j];
		   else
	   	   goto x;
	   }
    }
    for(i=0; i<set; i++)
	{   
		if((sqrt((pow(dats[i][0],2))+(pow(dats[i][1],2))))==(dats[i][2]))
		cout<<"YES"<<endl;	   
		else
		cout<<"NO"<<endl;
    }
    }
    
    x:return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a,b,c,A,B,C,x,i,n;
	cin>>n;
	for(i=0;i<n;i++){
	cin>>a>>b>>c;
	if(a<b)swap(a,b);
	if(a<c)swap(a,c);
	if(b<c)swap(b,c);
	A=a*a;
	B=b*b;
	C=c*c;
	x=B+C;
	if(A==x){
		cout<<"YES"<<endl;
	}else{
		cout<<"NO"<<endl;
	}
	}
	return 0;
}

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

int main(){
	int hen[3],n,i,max;
	cin>>n;
	for(i = 0;i < n;i++){
		cin>>hen[0]>>hen[1]>>hen[2];
		sort(hen,hen+3);

		if(pow(hen[2],2) == (pow(hen[0],2)+pow(hen[1],2)))
				cout<<"YES"<<endl;

		else
				cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<stdio.h>

int main(void)
{
  int n;
  int a[100],b[100],c[100];
  int i;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    scanf("%d",&b[i]);
    scanf("%d",&c[i]);
  }
  for(i=0;i<n;i++){
    if((c[i]*c[i]==a[i]*a[i]+b[i]*b[i]) ||
       (a[i]*a[i]==b[i]*b[i]+c[i]*c[i]) ||
       (b[i]*b[i]==a[i]*a[i]+c[i]*c[i])){
      printf("YES\n");
    }
    else{
      printf("NO\n");
    }
  }
  return(0);
  }

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

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int n;
	
	cin >> n;
	
	for (int i = 0; i < n; i++){
		int a,b,c;
		cin >> a >> b >> c;

		if (a < c){
			swap (a, c);
		}
		if (b < c){
			swap (b, c);
		}
		if (a * a + b * b == c * c)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
	int n,a,b,c;
	cin>>n;
	for (;n--;){
		cin>>a>>b>>c;
		if (a>b) swap(a,b);
		if (b>c) swap(b,c);
		if (a*a+b*b==c*c)
			cout<<"YES\n";
		else
			cout<<"NO\n";
	}
}

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef  long long LL;
typedef  vector<int> VI;
typedef  vector<double> VD;
typedef  string STR;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
#define POW2(a) pow(a, 2.0)
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	int x;
	cin >> x;
	REP(i,x)
	{
		VD tri;
		REP(i, 3)
		{
			double temp;
			cin >> temp;
			tri.push_back(temp);
		}
		SORT(tri);
		if (tri[2] == sqrt(POW2(tri[0]) + POW2(tri[1])))
		{
			COUT("YES");
		}
		else
		{
			COUT("NO");
		}
	}
	
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}