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<iostream>
#include<cmath>
using namespace std;
int main(){
	int t,s=-1,j;
	cin>>t;
	while(t--){
		int a[3],x=0;
		for(int i=0;i<3;i++){
			cin>>a[i];
			if(s<a[i]) j=i;
		//	x+=a[i];
		}
	    //x-=a[j];
	    //if(x<a[j]) cout<<"NO"<<endl;
	  //  else{
	    	x=0;
	    	for(int i=0;i<3;i++){
	    	 a[i]=pow(a[i],2);
	    	 if(i!=j) x+=a[i];
	        }
	        if(a[j]==x) cout<<"YES"<<endl;
	        else cout<<"NO"<<endl;
	//	}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: #include <string>
#include <vector>
#include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int x,a[3];
    cin>>x;
    for(int i=1;i<x+1;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<stdio.h>
int main(){
	int a;
	int b;
	int c;
	int x;
	int y=1;
	int z;
	scanf("%d",&x);
		while(y<=x){
		scanf("%d",&a);
		scanf("%d",&b);
		scanf("%d",&c);
		if(c>=b){
			z=c;
			c=b;
			b=z;
		}
		if(a<=c){
			z=a;
			a=b;
			b=c;
			c=z;
		}
		else if(b>=a){
			z=b;
			b=a;
			a=z;
		}
	z=a*a-b*b-c*c;
	if(z==0)
		puts("YES");
	else
		puts("NO");
	y++;
	}
return(0);
}

C++: #define scanf_s scanf
#include <stdio.h>
#include <iostream>
using namespace std;
#define MAX 200
int main(void)
{
	int n,a, b, c,x, sum, cou = 0;
	scanf_s("%d", &n);
	for (int i = 0; i < n; ++i) {
		scanf_s("%d %d %d", &a, &b, &c);
		if (a > b) {
			x = a; a = b; b = x;
		}
		if (b > c) {
			x = b; b = c; c = x;
		}
		if(c* c == a*a + b * b)	printf("YES\n");
		else printf("NO\n");
	}
}

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

int main(){
  int a[3], n, mx;
  cin >> n;
  while(n--){
    cin >> a[0] >> a[1] >> a[2];
    mx = max(max(a[0],a[1]),a[2]);
    if(a[0]==mx)
      a[0]=0;
    else if(a[1]==mx)
      a[1]=0;
    else
      a[2]=0;
    if(mx*mx == a[0]*a[0]+a[1]*a[1]+a[2]*a[2])
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}

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

int main()
{
	int a,b,c;
	int x=0;
	int n;
	cin >> n;
	for(int i=0 ;i<n ;i++){
		cin >> a >> b >> c;
		if(a<b && c<b){
			x=a;
			a=b;
			b=x;
		}
		else if(a<c && b<c){
			x=a;
			a=c;
			c=x;
		}

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

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

const char* judge_right_triangle(int, int, int);

int main(void)
{
    int a, b, c, n;
    cin >> n;
    for (int i = 0; i < n; i++ ) {
        cin >> a >> b >> c;
        cout << judge_right_triangle(a, b, c) << endl;
    }
    return 0;
}

const char* judge_right_triangle(int a, int b, int c)
{
    if ((a * a + b * b == c * c || b * b + c * c == a * a) || c * c + a * a == b * b) {
        return "YES";
    } else {
        return "NO";
    }
}

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

template <typename T>
bool isRight_Triangle ( T a, T b, T c )
{
	return (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
}

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

			if (isRight_Triangle(a, b, c)) {
				cout << "YES" << endl;
			}
			else {
				cout << "NO" << endl;
			}
		}
	}
	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int a,b,c;
	int i;
	int times;
	
	scanf("%d",&times);
	
	for(i=0;i<times;i++)
	{
		scanf("%d %d %d",&a,&b,&c);
		
		if(0.0 == (double)(a*a + b*b - c*c)/(2*a*b))
		{
			printf("YES\n");
		}
		else if(0.0 == (double)(b*b + c*c - a*a)/(2*b*c))
		{
			printf("YES\n");
		}
		else if(0.0 == (double)(c*c + a*a - b*b)/(2*c*a))
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	
	return 0;
}

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

int main(){
  int n;
  int t[3];
  cin >> n;

  for(int i=0;i<n;i++){
    for(int j=0;j<3;j++) cin >> t[j];
    sort(t,t+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<cstdio>
int main(){char a[9];puts(*gets(a)&a[2]^a[4]?"Open":"Close");}

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

C++: #include <iostream>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        int a = 0; int b = 0; int c = 0;
        for (int j = 0; j < 3; j++) {
            int x; cin >> x;
            if (x > a) { c = b; b = a; a = x; }
            else if (x > b) { c = b; b = x; }
            else if (x > c) { c = x; }
        }
        if (a * a == b * b + c * c)
            cout << "YES\n";
        else
            cout << "NO\n";
    }
}

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

int N;

string solve(int* a) {
    if ( ((a[0]*a[0]) + (a[1]*a[1])) == (a[2]*a[2]) ) {
        return "YES";
    }
    return "NO";
}

int main() {
    cin >> N;

    int a[3] = {0};
    while (cin >> a[0]) {
        cin >> a[1];
        cin >> a[2];
        sort(a, a+3);
        string res = solve(a);
        cout << res << endl;
    }

    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
#define rep(i,n) for(i = 0;i < n;i++)

int N;
int main(){
	int i;
	char *str[1001];
	cin >> N;
	rep(i,N){
		int l[3];
		cin >> l[0] >> l[1] >> l[2];
		sort(l,l+3,greater<int>());
		if(l[0]*l[0] == l[1]*l[1]+l[2]*l[2])
			str[i] = "YES";
		else
			str[i] = "NO";
	}
	rep(i,N){
		cout << str[i] << endl;
	}
	return 0;
}

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

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

	return 0;
}

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

int main()
{
 int n;
 int a[1000], b[1000], c[1000];

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

 for(int i=0; i<n; 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] == a[i]*a[i] + b[i]*b[i]) cout << "YES\n";
  else cout << "NO\n";
 }

 return 0;
}