Go: package main

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

func main() {
	n, err := strconv.Atoi(strScan())
	if err != nil {
		fmt.Println("数字を入力して下さい。")
	} else {
		var counter int = n
		var judgeArr []string
		scanner := bufio.NewScanner(os.Stdin)
		for scanner.Scan() {
			strArr := strings.Fields(scanner.Text())
			castNumArr := StringToInt(strArr)
			judgeArr = append(judgeArr, checkTriangle(castNumArr))
			counter--
			if counter == 0 {
				break
			}
		}
		for _, v := range judgeArr {
			fmt.Println(v)
		}
	}
}

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"
	} else {
		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<math.h>
int main()
{
	int n,i;
	int a[1000],b[1000],c[1000];
	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((double)(c[i]*c[i])==(double)(a[i]*a[i]+b[i]*b[i])){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

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


int main() {
    int n;cin>>n;
    for(int i=0;i<n;i++){
        int a,b,c;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;
        }
    }
}

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);
d=a+b;
e=a+c;
f=b+c;
if(a>b){
  if(a>c)
    max=a;
  else max=c;}
 else if(b>c)
   max=b;
     else max=c;
if(d<e){
  if(d<f)
    min=d;
  else min=f;}
 else if(e<f)
   min=e;
     else min=f;
 if(a*b*c==0)
   n[j]=0; 
 else if  (max<min)
   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;

void triangle_check(int max, int x, int y);

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

    cin >> n;

    while (n-- > 0) {
        cin >> a >> b >> c;

        if (a > b) {
            if (a > c) {
                triangle_check(a, b, c);
            }
            else {
                triangle_check(c, a, b);
            }
        }
        else {
            if (b > c) {
                triangle_check(b, a, c);
            }
            else {
                triangle_check(c, a, b);
            }
        }
    }

    return 0;
}

void triangle_check(int max, int x, int y) {
    if ( max*max == x*x + y*y )
        cout << "yes" << endl;
    else
        cout << "no" << endl;
}

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

 int main() {

	 int n = 0;
	 int a[3];
	 std::cin >> n;


	 while (std::cin>>a[0]>>a[1]>>a[2]) {

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

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

			 for (int d = 0; d < 3; ++d) {
				 a[d] = 0;
			 }
		
	 }

}

C++: #include <iostream>
#include <cstdio>
#include <iomanip>
#include <algorithm>
#include <cmath>
using namespace std;
const int M = 100000;
const double pi = 3.141592653589;

int main()
{
	int n;
	int a[1001], b[1001], c[1001];
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i] ^ 2 == b[i] ^ 2 + c[i] ^ 2 || b[i] ^ 2 == a[i] ^ 2 + c[i] ^ 2 || c[i] ^ 2 == a[i] ^ 2 + b[i] ^ 2) {
			printf("YES\n");
		}
		else printf("NO\n");
	}
}

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
		x = x^2;
		y = y^2;
		z = z^2;
			if((x+y)==z||(x+z)==y||(y+z)==x){
				printf("Yes\n");
			}
			else {
				printf("No\n");
			}
		}
	return 0;
}

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

int main(){

  int i;
  int n[3];
  int temp;

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

  return 0;
}

C++: #include <cstdio>
#include <cstdlib>

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

	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {

	int dataNum;
	int hen[1000][3];

	cin >> dataNum;
	for (int i = 0; i < dataNum; i++) {
		cin >> hen[i][0] >> hen[i][1] >> hen[i][2];
	}

	for (int i = 0; i < dataNum; i ++) {

		//????????????????????§?????????
		for (int j = dataNum - 1; j > 0; j--) {
			for (int k = 0; k < j; k++) {
				if (hen[k] > hen[k + 1]) {
					int dummy = hen[i][k];
					hen[i][k] = hen[i][k + 1];
					hen[i][k + 1] = dummy;
				}
			}
		}

		//??´?§?????????§??????
		if (hen[i][0] * hen[i][0] + hen[i][1] * hen[i][1] == hen[i][2] * hen[i][2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}

	return 0;
}

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

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

	return 0;
}

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

int main(void){
	int x[3];
	cin >> x[1];
	string n = "NO", y = "YES";
	while(cin >> x[0] >> x[1] >> x[2]){
		sort(x,x + 3);
		if(x[2] * x[2] == x[1] * x[1] + x[0] * x[0])
			cout << y << endl;
		else
			cout << n << endl;
	}
	return 0;
}

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

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

int main() {
	int data_sets_num = 0;		//??\???????????????????????????????????°
	std::vector<string> result;
	
	cin >> data_sets_num;
	for (int i = 0; i < data_sets_num; i++) {
		int first, second, third;

		cin >> first >> second >> third;
		if (
			(first * first == second * second + third * third) ||
			(second * second == first * first + third * third) ||
			(third * third == second * second + first * first)
			) {
			result.push_back("YES");
		}
		else {
			result.push_back("NO");
		}
	}

	for (unsigned int j = 0; j < result.size(); j++) {
		cout << result[j] << 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>

using namespace std;

bool right(int a, int b, int c) {
    return a*a+b*b == c*c;
}

int main() {
    int n;
    cin >> n;
    while(n--) {
        int a, b, c;
        cin >> a >> b >> c;
        if(right(a,b,c) || right(a,c,b) || right(b,c,a)) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}