Go: package main

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

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)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

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
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	}
	return "NO"
}
func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

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

int main()
{
        int a, b, c;
        int num;

        cin >> num;

        for(int i=0; i<num; i++){
                cin >> a >> b >> c;
                if( a>=b && a>=c ){
                        (a*a == b*b+c*c) ? cout<<"Yes\n" : cout<<"No\n";
                }else if( b>=a && b>=c ){
                        (b*b == a*a+c*c) ? cout<<"Yes\n" : cout<<"No\n";
                }else if( c>=a && c>=b ){
                        (c*c == b*b+a*a) ? cout<<"Yes\n" : cout<<"No\n";
                }
        }

        return 0;
}

C++: #include <stdio.h>

int main ()
{
    int n=0,i=0,a,b,c;
    scanf("%d",&n);
    while(n--)
    {
        scanf("%d%d%d",&a,&b,&c);
        if(a>1000 && b>1000 && c>1000 &&a<1000 && b<1000 && c<1000)
            break;
        if(c*c == (a*a + b*b))
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}

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