Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

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

using namespace std;

int main() {
  int ct = 0;
  int a[3];

  scanf("%d", &ct);
  for(int i = 0; i < ct; i++) {
    scanf("%d %d %d", &a[0], &a[1], &a[2]);
    sort(a, a + 3);
    printf("%s\n", a[2] * a[2] == a[0] * a[0] + a[1] * a[1] ? "YES" : "NO");
  }
  return 0;
}

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

char const *answer(int a,int b,int c){
	if(c*c == (a*a+b*b))	return "YES";
	else		return "NO";
}

int swap(int x,int y){
	int temp = x;
	x = y;
	y = temp;
}

int main() {
	int n,a,b,c;
	cin >> n;
	for(int i=0;i<n;i++){
	cin >> a >> b >> c;
	if(a>b) swap(a,b);
	if(b>c) swap(b,c);
	cout << answer(a,b,c) << endl;
	}
}

C++: #include <iostream>
#include <string>
#include <math.h>

using namespace std;

int main(void){
	int n,val[3];

	cin >> n;
	for(int i=0;i<n;i++){
		for(int j=0;j<3;j++)
			cin >> val[j];

		for(int j=0;j<2;j++)
	        	for(int k=0;k<2-j;k++)
        			if(val[k]>val[k+1]){
                			int tmp = val[k];
                			val[k]=val[k+1];
                			val[k+1]=tmp;
				}
		string str = (pow(val[0],2.0)+pow(val[1],2.0)==pow(val[2],2.0))?"YES":"NO";
		cout << str << endl;
	}

	return 0;
}

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