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
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef  long long LL;
typedef  vector<int> VI;
typedef  vector<double> VD;
typedef  string STR;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
#define POW2(a) pow(a, 2.0)
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	int x;
	cin >> x;
	REP(i,x)
	{
		VD tri;
		REP(i, 3)
		{
			double temp;
			cin >> temp;
			tri.push_back(temp);
		}
		SORT(tri);
		if (tri[2] == sqrt(POW2(tri[0]) + POW2(tri[1])))
		{
			COUT("YES");
		}
		else
		{
			COUT("NO");
		}
	}
	
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){

	int a,b,c;
	int N;
	cin >> N;

	for(int i=0;i<N;i++){
		
		cin >> a >> b >> c;

		if(a*a + b*b == c*c
		  || c*c + a*a == b*b
		  || b*b + c*c == a*a){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}



	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <sstream>
 
using namespace std;
 
int main(){
    int n;
    int a, b, c;
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> a >> b >> c;
        int ary[3] = {0};
        ary[0] = a * a;
        ary[1] = b * b;
        ary[2] = c * c;
        sort(ary, ary + 3);
        ary[2] - (ary[0] + ary[1]) || cout << "YES" << endl;
        ary[2] - (ary[0] + ary[1]) && cout << "NO" << endl;
    }
    return 0;
}

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

bool IsRightTriangle(const int a, const int b, const int c)
{
	vector<int> SideLength(3);
	SideLength[0] = a;
	SideLength[1] = b;
	SideLength[2] = c;
	sort(SideLength.begin(), SideLength.end(), greater<int>());
	if(SideLength[0] * SideLength[0] == SideLength[1] * SideLength[1] + SideLength[2] * SideLength[2]){
		return true;
	}else{
		return false;
	}
}

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

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <bitset>
#include <set>
#include <queue>

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,b,n) for(int i=b;i<n;i++)

const float PI = 3.1415926;
static const int INFTY = (1<<30);

using namespace std;

typedef long long ll;
typedef long double ld;

ll n, a, b, c;

int main() {
  cin >> n;
  rep(i,n){
    cin >> a >> b >> c;
    if(a+b>c && a+c>b && c+b>a)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }

  return 0;
}

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

using namespace std;

int main(int argc, char **argv)
{
	int a[3], n;
	
	cin >> n;
	for(int i = 0; i < n; i++){
		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++: #include<iostream>
using namespace std;
int main(){
int n,a,b,c,i;
cin>>n;
for(i=0;i<n;i++){
cin>>a>>b>>c;
if(a<=b+c && b<=a+c && c<=a+b)cout<<"YES"<<endl;else cout<<"NO"<<endl;
}
return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int N;
cin >> N;
while(N--){
int i[3],c;
int max;
cin >> i[0] >> i[1] >> i[2];
sort(i,i+3);
cout << ((i[0]*i[0]+i[1]*i[1]==i[2]*i[2])?"YES\n":"NO\n");
}}

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

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

int main() {
	int x, n, m, l;
	vector<string> v;
	
	cin >> x;

	while(cin >> n >> m >> l) {
		if(l*l == n*n + m*m) {
			v.push_back("Yes");
		} else {
			v.push_back("No");
		}
	}

	for(int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}

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

int main(){
	int a;
	cin>>a;
	for(int b=0;b<a;b++){
		vector<int>c(3);
		for(int d=0;d<3;d++)cin>>c[d];
		sort(c.begin(),c.end());
		if(c[0]*c[0]+c[1]*c[1]==c[2]*c[2])cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
		}
}

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

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

C++: #include <iostream>
#include<algorithm>
using namespace std;
int main(){
    int a,b,c,d;
    cin>>d;
    for(int e=0;e<d;e++){
        cin>>a>>b>>c;
        if(a*a==b*b+c*c){
            cout<<"YES"<<endl;
        }else if(b*b==a*a+c*c){
            cout<<"YES"<<endl;
        }else if(c*c==a*a+b*b){
            cout<<"YES"<<endl;
        }else{cout<<"NO"<<endl;
        }
    }
    return 0;
}

C++: #include<stdio.h>


int main(){
  int i;
  int j = 0;
  scanf("%d",&i);
  // printf("%dツ嘉アツ禿シツ療債つオツづつュツつセツつウツつ「\n",i);
   while(j < i){
    int x,y,z;
    scanf("%d",&x);
    scanf(" %d",&y);
    scanf(" %d/n",&z);
    int X = x * x;
    int Y = y * y;
    int Z = z * z;
    if(X == 0 || Y == 0 || Z == 0){
      printf("NO\n");
    }else if(X == Y + Z){
      printf("YES\n");
    }else if(Y == X + Z){
      printf("YES\n");
    }else if(Z == X + Y){
      printf("YES\n");
    }else{
      printf("NO\n");
    }
    j++;
    // printf("%d %d %d\n",x,y,z);
   }
  return 0;
}

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

int main(){
	int n,data[3];
	std::cin>>n;
	for(int i=0;i<n;i++){
		std::cin>>data[0]>>data[1]>>data[2];
		std::sort(data,data+3);
		std::cout<< (data[0]*data[0]+data[1]*data[1]==data[2]*data[2]?"YES":"NO")<<std::endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	unsigned N=0;
    unsigned a[1001]={0},b[1001]={0},c[1001]={0};
	unsigned soto=0;
	unsigned i=0;
	scanf("%d",&N);
	for (i=0;i<N;i++)
	{
		scanf("%d %d %d",&a[i],&b[i],&c[i]);
		if (a[i]<b[i])
		{
			soto=a[i];
			a[i]=b[i];
			b[i]=soto;
		}
		if (a[i]<c[i])
		{
			soto=a[i];
			a[i]=c[i];
			c[i]=soto;
		}
	}
	for (i=0;i<N;i++)
	{
		if (a[i]*a[i]==b[i]*b[i]+c[i]*c[i])
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	return 0;
}