Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	scanner.Split(bufio.ScanWords)
	n := nextInt()
	for i := 0; i < n; i++ {
		a := nextInt()
		b := nextInt()
		c := nextInt()
		if a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		continue
	}
}

C++: #include<stdio.h>
int main(void){
  int max,min,a,b,c,d,e,f,i,j;
int n[9999];
j=0;
scanf(" %d", &i);
while(j<i){
scanf(" %d %d %d",&a,&b,&c);

if(a>b){
  if(a>c){
    max=a;
  min=b*b+c*c;}
  else max=c;}
 else if(b>c)
   max=b;
     else max=c;
//printf("%d\n%d %d %d %d\n",max,a*a,b*b,c*c,max*max);
 if(a*a+b*b+c*c==2*max*max)
   n[j]=1;
 else n[j]=0;
 j++;}
for(j=0;j<i;j++){
  if(n[j])
    printf("YES\n");
  else 
    printf("NO\n");
 }
return 0;
}

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

int main()
{
	int N=0,a=0,b=0,c=0;
	int num=0;
	
	//????????????????????°?????\???
	cin >> N;
	
	for(N; N>0; N--){
		cin >> a >> b >> c;
		
		//??????????????????
		if(a < b){
				num = a;
				a = b;
				b = num;
		}
		if(a < c){
				num = a;
				a = c;
				c = num;
		}
		
		a = a * a;
		b = b * b;
		c = c * c;
		
		if(a == (b + c)) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	
	return 0;
}

C++: #include <iostream>

using namespace std;
string rightanswer = "YES";
string falseanswer = "NO";
int loop;
int panjang[1000][3];
int y = 0;
int temp;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];
        if(panjang[x][y]>1000||panjang[x][y]<1||panjang[x][y+1]>1000||panjang[x][y+1]<1||panjang[x][y+2]>1000||panjang[x][y+2]<1)
            return 0;
}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<5;looper2++)
{
    if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
            if((panjang[looper][y+1]<(panjang[looper][y+2])))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;

    }

    }
}
cout << endl;
}
for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << rightanswer << endl;
    else cout << falseanswer << endl;
}


}

C++: #include <iostream>
//#include <cstdio>
//#include <cmath>
using namespace std;
 
//0003
int main(){
	int n;
	int a, b, c, a2, b2, c2;
	cin >> n;
	while(--n){
		cin >> a >> b >> c;
		a2 = a^2;
		b2 = b^2;
		c2 = c^2;

		if(a==b==c) cout << "NO" << endl;
		if(a2==b2+c2 || b2==a2+c2 || c2==a2+b2){
			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(int i=1;i<=N;i++){
		cin>>a>>b>>c;
		if((a*a)+(b*b)==(c*c)){
			cout<<"Yes"<<endl;
		}
		else{
			cout<<"No"<<endl;
		}
	}
	return 0;
}

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

using namespace std;

int main(){
	int n;
	cin >> n;
	while(n--){
		int a, b, c;
		cin >> a >> b >> c;
		int x, y ,z;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(x*x == y*y + z*z)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
}

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

int main(void)
{
    int n, a[3];
    bool flag = false;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%d %d %d", &a[0], &a[1], &a[2]);
        for (int j = 0; j < 3; ++j) {
            if (a[j] * a[j] == (a[(j + 1) % 3] * a[(j + 1) % 3] + a[(j + 2) % 3] * a[(j + 2) % 3])) {
                flag = true;
            }
        }
        if (flag) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

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

int main()
{
	int N;
	scanf("%d", &N);
	int i, a[1000], b[1000], c[1000];
	for (i = 0; i < N; i++)
	{
		scanf("%d %d %d", &a[i], &b[i], &c[i]);
	}
	for (i = 0; i < N; i++)
	{
		float A = a[i], B = b[i], C = c[i];
		float d = fmax(A, B), sm1 = fmin(A, B);
		float biggest = fmax(d, C), sm2 = fmin(d, C);
		if (pow(biggest, 2) == (pow(sm1, 2) + pow(sm2, 2)))printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<int,int> P;
typedef pair<P,P> PP;
const ll MOD=10000;
const ll INF=1000000000;
const int MAX=100001;
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int main(){
    int a,b,c,n;
    cin>>n;
    while(n){
        cin>>a>>b>>c;
        int a2=a*a;int b2=b*b;int c2=c*c;
        if(a2==b2+c2||b2==a2+c2||c2==a2+b2){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
        n--;
    }
    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int n;
  cin>>n;
  rep(i,n){
    vector<int>in(3);
    rep(i,3)cin>>in[i];
    sort(all(in));
    string ans;
    if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])ans="YES";
    else ans="NO";
    cout<<ans<<endl;
  }


}

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

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

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

int main(){
	int n=0,i=0,k=0,a,b;
	int x[100] = {0} ;
	char y[100] ={0} ;

	while(1){
	cin >> n ;

	if(n <= 1000) break ;
	}
	for(i=0;i<3*n;i+=3){

		while(1){

		cin >> x[i] >> x[i+1] >> x[i+2] ;

		if((x[i] >= 1) && x[i] <=1000){
			if((x[i+1] >= 1) && x[i+1] <=1000){
				if((x[i+2] >= 1) && x[i+2] <=1000){
					break;
				}
			}
		}
		}
		if(x[i+1] > x[i]) {
			k = x[i+1];
			x[i+1] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i]) {
			k = x[i+2];
			x[i+2] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i+1]) {
			k = x[i+2];
			x[i+2] = x[i+1];
			x[i+1] = k ;
		}
	}

	for(i=0;i< 3*n; i+=3){
				a = x[i] * x[i] ;
		b = (x[i+1] * x[i+1] ) + (x[i+2] * x[i+2]) ;

		if( a == b) cout << "YES" << endl ;
		if( a != b) cout << "NO" << endl ;

	}

    return 0;
}

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

int main(){
  int hoge,a,b,c,nya,wan;
  cin >> hoge;
  for(int i=0;i<hoge;i++){
    nya = 0;
    cin >> a >> b >> c;
    wan = a;
	if(b*b+c*c==a*a) nya = 1;
	if(b>wan){ wan = b; if(a*a+c*c==b*b) nya = 1;}
    if(c>wan) if(a*a+b*b==c*c) nya = 1;

	if(nya == 1) cout << "YES" << endl;
	else cout << "NO" << endl;
  }
  return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int x, y, z;
	scanf("%d %d %d", &x, &y, &z);
	while (1) {
		if (x > y + z || y > x + z || z > x + y ) {
			break;
		} 
		if (x * x == y * y + z * z || y * y == x * x + z * z || z * z == x * x + y * y) {
			printf("YES\n");
		}else {
			printf("NO\n");
		}
	return 0;
	}
}