Go: package main

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

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		cols := sort.StringSlice(strings.Split(sc.Text(), " "))
		cols.Sort()
		for i, c := range cols {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
    for(int i=0;i<n;i++){
      cin>>a[0]>>a[1]>>a[2];
    sort(a,a+3);
    if(a[2]*a[2]==(a[1]*a[1])+(a[0]*a[0])){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
    }
  return 0;
}

C++: #include<stdio.h>
#include<iostream>

using namespace std;


int main(){
	int n;
	cin>>n;
	int hen1,hen2,hen3,saidai,max_pos=1;

	for(int i=0;i<n;i++){
		cin>>hen1>>hen2>>hen3;

		saidai=hen1;
		if(saidai<hen2){
			saidai=hen2;
			max_pos=2;
		}
		if(saidai<hen3){
			saidai=hen3;
			max_pos=3;
		}
		switch(max_pos){
		case 1:
			hen1=0;
			break;case 2:
			hen2=0;
			break;case 3:
			hen3=0;
		}
		if(saidai*saidai==hen1*hen1+hen2*hen2+hen3*hen3)
			cout<<"YES"<<"\n";
		else{
			cout<<"NO"<<"\n";
		}
	}
	
	
	return 0;
}

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

using namespace std;

int main() {
    int n;
    int edge[1000][3];
    
    cin >> n;
    
    for (int i = 0; i < n; i++) {
        cin >> edge[i][0] >> edge[i][1] >> edge[i][2];
        sort(edge[i], edge[i] + 3);
    }
    
    for (int i = 0; i < n; i++) {
        int *tmp = edge[i];
        if (pow(tmp[0], 2) + pow(tmp[1], 2) == pow(tmp[2], 2)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

C++: #include <bits/stdc++.h>
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int n;
cin >> n;
int a[n][3];
for(int i=1; i<=n; i++){
for(int j=0; j<=3; j++){
cin >>a[i][j];
}
}
for(int i=1; i<=n; i++){
if(((a[i][1]+a[i][2])>=a[i][3]) || ((a[i][1]+a[i][3])>=a[i][2]) || ((a[i][2]+a[i][3])>=a[i][1]))
{
    cout << "YES" << endl;
}
else{cout << "NO" << endl;}
}
}

C++: #include <iostream>
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*a==b*b+c*c || b*b==a*a+c*c || c*c==a*a+b*b) cout << "YES" << endl;
    else cout << "NO" << endl;

  }


  return 0;
}

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;
}