Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

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

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		m=max(m,a[2]);
		int d = 30;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		int s = 9;
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			if(m<=s)puts("YES");
			else puts("NO");
		}else{
			if(m<=s)puts("NO");
			else puts("YES");
		}
	}
}

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

int main()
{
	int iCount, ia, ib, ic;
	int iTrueFlag[1000];

	cin >> iCount;

	for( int i=0;i<iCount;i++ ){
		cin >> ia >> ib >> ic;

		if( (ia * ia) + (ib * ib) == (ic * ic) )
			iTrueFlag[i] = 1;
		else
			iTrueFlag[i] = 0;
	}

	for( int i=0;i<iCount;i++ ){
		if( iTrueFlag[i] == 1 )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

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

int main(){
	int t[1000][3], cnttri, dataset_num, i;
	cin>>dataset_num;
	for(cnttri=0;cnttri<dataset_num;cnttri++){
		cin>> t[cnttri][0] >> t[cnttri][1]>> t[cnttri][2];
		sort(t[cnttri], t[cnttri]+2);
	}
	for(i=0;i<cnttri;i++){
		if(t[i][2]*t[i][2] == t[i][1]*t[i][1] + t[i][0]*t[i][0]){
			cout << "YES\n";
		}else{
			cout << "NO\n";
		}
	}
	return 0;
}

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

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

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

C++: #include<cstdio>

using namespace std;

int main()
{
	int a[100];
	int b[100];
	int c[100];
	int len, i;
	
	scanf("%d",&len);
	
	for(i = 0; i < len; i++){
		scanf("%d",&a[i]);
		scanf("%d",&b[i]);
		scanf("%d",&c[i]);
	}
	
	for(i = 0; i < len; i++){
		if((a[i]*a[i] == b[i]*b[i] + c[i]*c[i])||(b[i]*b[i] == a[i]*a[i]+c[i]*c[i])||(c[i]*c[i] == b[i]*b[i]+a[i]*a[i])){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	
	return 0;
}

C++: #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int aa[1000][1000]={};
int main()
{
    int  i=0,j=0,n=0,a=0,b=0,c=0,d=0;


    cin >> n;
    for(i=0;i<n;i++){
        if(i>0)cout << endl;
        d=0;
        cin >> a >> b >> c;
        if(a>b&&a>c){
            if((a*a-(b*b+c*c)==0)){
                cout << "YES";
            }
            else cout << "NO";

        }

        else if(b>c){
            if((b*b-(a*a+c*c)==0)){
                cout << "YES";
            }
            else cout << "NO";

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


    }

}

C++: #include<stdio.h>
int main(){
int n,a[1000],b[1000],c[1000],i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d %d",&a[i],&b[i],&c[i]);
}
for(i=0;i<n;i++){
if(a[i]*a[i]+b[i]*b[i]==c[i]*c[i]||c[i]*c[i]+b[i]*b[i]==a[i]*a[i]||a[i]*a[i]+c[i]+c[i]==b[i]*b[i]){
printf("YES\n");
}
else{
printf("NO\n");
}
}
return 0;
}

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

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;

		int max=a, k=b, l=c;
		if(max < b){
			max = b;
			k=a;
		}else if(max < c){
			max = c;
			l=a;
		}

		if(max*max == k*k + l*l)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(){int n,l,s;scanf("%d",&n);while(n--){int i[3];scanf("%d %d %d",&i[0],&i[1],&i[2]);l=2;while(l--){if(i[l+1]>i[l]){s=i[l+1];i[l+1]=i[l];i[l]=s;}}printf("%s\n",i[2]*i[2]+i[1]*i[1]==i[0]*i[0]?"YES":"NO");}return 0;}

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

int main()
{
	int x;
	int a[3];

	cin >> x;

	for (int i = 0; i < 3; i++) {
	cin>>a[i];
	}
	sort(a, a + 3);
	if ((a[1] * a[1]) + (a[0] * a[0]) == (a[2] * a[2])) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
string isRightTriangle(int s1, int s2, int s3) {
  int a = s1, b = s2, c = s3;
  for(int i = 0; i < 3; ++i) {
	if(a*a + b*b == c*c) {
	  return "YES";
	}
	if(i == 0) swap(a, b);
	if(i == 1) swap(b, c);
  }
  return "NO";
}
int main() {
  int N, s1, s2, s3;
  cin >> N;
  for(int i = 0; i < N; ++i) {
	cin >> s1 >> s2 >> s3;
	cout << isRightTriangle(s1, s2, s3) << endl;
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main (void){
	int i;
	double a,b,c;

	cin>>i;
	while(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;
		}
		i--;
		
	}
}

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

using namespace std;

int main(){

	int i, m;
	cin >> m;

	for(i=0; i<m; i++){

	int a[3];

	cin >> a[0] >> a[1] >> a[2];
	sort(a, a+3);

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

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

int main(){
	int a, b, c;
	int d;
	int n;

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

		if (a > c){
			d = c;
			c = a;
			a = d;
		}
		if (b > c){
			d = c;
			c = b;
			b = d;
		}

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

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <math.h>
using namespace std;
int main(){
    double a[1010], n, s, k=0, i=0;
    cin >> n;
    for(i=0; i<n;i++){
             cin>>a[0]>>a[1]>>a[2];
             sort(a, a+3);
             k=(a[1]*a[1])+(a[0]*a[0]);
             if(a[2]==sqrt(k))
             printf("YES\n");
             else
             printf("NO\n");
    }
    return 0;
}

C++: #include<stdio.h>
int main(void)
{
    int t,i,max,s,a[3]={0};
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d%d%d",&a[0],&a[1],&a[2]);
        max = 0;s = 0;
        for(i=0;i<3;i++)
            if(a[i]>max)max = a[i];
        for(i=0;i<3;i++)
        {
            if(a[i]!=max)
                s += a[i]*a[i];
        }
        max = max*max;
        if(max==s)
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}

C++: #include "stdio.h"

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

	scanf("%d", &n);
	printf("\n");

	for (int i = 0; i < n; i++){
		scanf("%d %d %d", &a, &b, &c);

		a *= a;
		b *= b;
		c *= c;

		if(c == a+b || b == a+c || a == b+c) printf("YES\n");
		else printf("NO\n");
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a, b, c;
	int n;
	cin >> n;

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

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