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)
		for i, c := range strings.Split(sc.Text(), " ") {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		sort.IntSlice(edges).Sort()
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

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

#define int long long int
#define main signed main()
#define bye return 0
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define each(p, v) for (auto p = (v).begin(); p != (v).end(); p++)
#define all(v) (v).begin(), (v).end()
#define prec(n) fixed << setprecision(n)
#define dump(x) cerr << "(L" << __LINE__ << ") " << #x << " = " << (x) << endl
#define clr(x, a) memset(x, a, sizeof(x))

#define sum(v) accumulate(all(v), 0)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define odd(n) ((n) % 2)
#define even(n) (!odd(n))

#define INF 1000000000
#define MOD 1000000007

#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define vi vector<int>
#define vb vector<bool>
#define vc vector<char>

using namespace std;

main {
  int n;
  cin>>n;
  rep(i,n) {
    int a,b,c;
    cin>>a>>b>>c;
    a*=a; b*=b; c*=c;
    cout<<(a+b==c||b+c==a||c+a==b?"YES":"NO")<<endl;
  }
  bye;
}

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

C++: 
#include <string>
#include <sstream>
#include <iostream>

int main(void) 
{
    std::string str;
    int lens[3];
    int nolines;

    getline(std::cin, str);
    std::istringstream str_s(str);

    str_s >> nolines;

    int i;
    for (i = 0; i < nolines; i++) {
        getline(std::cin, str);
        std::istringstream str_s(str);

        str_s >> lens[0] >> lens[1] >> lens[2];

        std::sort(lens, lens+3);

        if (lens[2] * lens[2] == lens[0] * lens[0] + lens[1] * lens[1]) 
            std::cout << "YES" << std::endl;
        else
            std::cout << "NO"  << std::endl;
    }

    return 0;
}

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

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


using namespace std;

string check(int a,int b,int c){
	if(a*a+b*b==c*c)return "YES";
	else return "NO";
}


int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		vector<int> n;
		int a,b,c;
		cin>>a>>b>>c;
		n.push_back(a);
		n.push_back(b);
		n.push_back(c);
		sort(n.begin(),n.end());
		string ans=check(a,b,c);
		cout<<ans<<endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define REP(i,N) for(int i = 0; i < (int)N; i++)

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

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

using namespace std;

int main()
{
        double c[3];
        int i = 0;
        int temp = 0;
        int data = 0;
        int j = 0;
        int count = 0;
        double hoge,fuga;

        cin >> data;

        while(j<data)
        {
                count = 0;
                cin >> c[0] >> c[1] >> c[2];
                while(count<2){
                for(i=0;i<2;i++)
                {
                        if(c[i]<c[i+1])
                        {
                                temp = c[i];
                                c[i]=c[i+1];
                                c[i+1]=temp;
                        }

                }
                count++;
                }
                hoge = pow(c[0],2.0);
                fuga = pow(c[1],2.0) + pow(c[2],2.0);

                if(hoge == fuga)
                {
                        cout << "YES" << endl;
                }
                else
                {
                        cout << "NO" << endl;
                }

                j++;
        }
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
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){
      cout << "YES" << endl;
    }
    else if(a*a+c*c==b*b){
      cout << "YES" << endl;
    }
    else if(b*b+c*c==a*a){
      cout << "YES" << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
}

C++: #include<stdio.h>
int main(void)
{
	int n=1;
	int i=0;
	int a,b,c;
	int irekae=0;
	
	while(n!=0)
	{
		scanf("%d",&n);
		if (n==0)
		{

		}
		else
		{
			for (i=1;i<=n;i++)
			{
				scanf("%d",&a);
				scanf("%d",&b);
				if (a<b)
				{
					irekae=a;
					a=b;
					b=irekae;
				}
				scanf("%d",&c);
				if (a>c)
				{
					irekae=a;
					a=c;
					c=irekae;
				}
				if (c*c==a*a+b*b)
				{
					printf("Yes\n");
				}
				else
				{
					printf("No\n");
				}
			}
		}
	}
	return 0;
}

C++: #include <stdio.h>

#define YES 1
#define NO 0

int tri_judge(int x, int y, int z);
int pow2(int x);

int main(void)
{
    int dataset;
    scanf("%d", &dataset);

    int side1, side2, side3;
    while (dataset--){
        scanf("%d %d %d", &side1, &side2, &side3);
        int yn = tri_judge(side1, side2, side3);
        if (yn == YES){
            printf("YES\n");
        } else {
            printf("NO\n");
        }

    }

    return 0;
}

int tri_judge(int x, int y, int z)
{
    int yn;
    if (pow2(x) == pow2(y) + pow2(z)){
        yn = YES;
    } else if (pow2(y) == pow2(z) + pow2(x)){
        yn = YES;
    } else if (pow2(z) == pow2(x) + pow2(y)){
        yn = YES;
    } else {
        yn = NO;
    }

    return yn;
}

int pow2(int x)
{
    return x * x;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int n, a, b, c;
	cin>>n;
	while(n) {
		cin>>a>>b>>c;
		if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==a*a+b*b)
			printf("YES\n");
		else printf("NO\n");
		n--;
	}
	return 0;
}

C++: #include <stdio.h>

int main(void){
  int deta;
  //データ数をもらう
  scanf("%d", &deta);

  //データ数だけ３辺の値をもらう
  for(int i = 0; i < deta; i++){
    int hen1, hen2, hen3;
    scanf("%d", &hen1);
    scanf("%d", &hen2);
    scanf("%d", &hen3);

    //直角三角形の判定
    if(hen1*hen1 + hen2*hen2 == hen3*hen3 ||
       hen2*hen2 + hen3*hen3 == hen1*hen1 ||
       hen3*hen3 + hen1*hen1 == hen2*hen2){
      printf("yes\n");
    }else{
      printf("no\n");
    }

    
  }


  return 0;
}

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

int N;
int a[3]; 

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  
}

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