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 <vector>
#include <numeric>

using namespace std;

int main(){
  int n;
  vector<int> a(3);
  cin >> n;

  while(n--){
    int MAX;
    
    cin >> a[0] >> a[1] >> a[2];
    a[0] *= a[0];
    a[1] *= a[1];
    a[2] *= a[2];
    MAX = max(a[0], max(a[1], a[2]));
        
    if(MAX == accumulate(a.begin(), a.end(), 0) - MAX){
      cout << "YES" << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
  
  return 0;
}

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

int main() {
  int n, a[3];
  cin >> n;
  while (n--) {
    for (auto& e : a) cin >> e;
    sort(a, a + 3);
    bool f = a[0] * a[0] + a[1] * a[1] == a[2] * a[2];
    if (f) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}

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){
if(b<a+c){
if(c<a+b){
cout<<"YES"<<endl;
}
}
}else {
cout<<"NO"<<endl;
}
}
return 0;
}

C++: #include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int main(void){
	int a;
	int b;
	int n;
	int c;

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

		return 0;
	}

C++: #include<stdio.h>
int main(void)
{
	int n=0;
	int i=0;
	int a,b,c;
	int irekae=0;
	int irekae2=0;
	scanf("%d",&n);
	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;
			irekae2=b;
			a=c;
			b=irekae;
			c=irekae2;
		}
		if (c*c==a*a+b*b)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	return 0;
}

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

#define REP(i, s, n) for(int i = s; i < n; ++i)
#define rep(i, n)		 REP(i, 0, n)
#define SORT(c)			 sort((c).begin(), (c).end())
#define IINF					INT_MAX
#define LLINF					LLONG_MAX
#define DEBUG					false

int main(){
    int n;
    vector<int> a(3);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[0]>>a[1]>>a[2];
        SORT(a);
        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>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
int n;
using namespace std;
int main(){
	std::ios::sync_with_stdio(false);
	

	cin>>n;
	for(int i=0;i<n;i++){
		priority_queue <int > dp;
		for(int i=0;i<3;i++){
			int k;
			cin>>k;
			dp.push(k);
		}
		int a=dp.top();dp.pop();
		int b=dp.top();dp.pop();
		int c=dp.top();dp.pop();
		if(a*a==((b*b)+(c*c))){
			cout<<"YES\n";
		}else{
			cout<<"NO\n";
		}
	}
	return 0;
}

C++: #include<iostream>
int main(){
	using namespace std;
	int j,n,leng[1000];
	cin>>n;
	for(int i=0;i<n;++i){
		cin>>leng[3*i]>>leng[(3*i)+1]>>leng[(3*i)+2];
		for(int a=0;a<3;++a)
        for(int b=a+1;b<3;++b)
            if(leng[(3*i)+a]>leng[(3*i)+b])j=leng[(3*i)+a],leng[(3*i)+a]=leng[(3*i)+b],leng[(3*i)+b]=j;

	}

	for(int i=0;i<n;++i){
		if((leng[3*i]^2)+(leng[(3*i)+1]^2) == (leng[(3*i)+2]^2))cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<string.h>
#include<math.h>
using namespace std;

#define MAX 256

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

	scanf("%d", &n);
	int ans[n];

	for (int i = 0; i < n; i++){
		scanf("%d%d%d", &a, &b, &c);
		if (a > b){
			int d = a;
			a = b;
			b = d;
		}
		if (c < a){
			int d = a;
			a = c;
			c = b;
			b = d;
		}
		else if (c > a&&c < b){
			int d = b;
			b = c;
			c = d;
		}
		if (a*a + b*b == c*c){
			ans[i] = 1;
		}
		else{
			ans[i] = 0;
		}
	}

	for (int i = 0; i < n; i++){
		if (ans[i] == 1)printf("YES\n");
		if (ans[i] == 0)printf("NO\n");
	}

	return 0;
}

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

using namespace std;

int main(void){
  int n,array[3],i,temp;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d%d%d",&array[0],&array[1],&array[2]);
    sort(array,array+3);
    if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2])  printf("Yes\n");
    else  printf("No\n");
  }

  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;

int n, a, b, c;

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

  return 0;
}

C++: #include <stdio.h>

void swap(int &a,int &b){
	int tmp=a ; a=b ; b = tmp; 
}
int main(){
	int array[3];
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
    for(int i=0; i<3; i++) scanf("%d",&array[i]);
    for(int i=0; i<3; i++) for(int j=0; j<2; j++) if(array[j]>array[j+1]) {
        swap(array[j],array[j+1]); 
        
    }
	if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2]){
		printf("YES\n");
	}else{
		printf("NO\n");
	}
	}
    return 0;
}

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

int main(){
	const int N = 1000;
	int n,a[N],b[N],c[N];
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i]>>b[i]>>c[i];
	}
	for(int i=1;i<=n;i++){
		if(a[i]*a[i] + b[i]*b[i] == c[i]*c[i] || a[i]*a[i] == b[i]*b[i] + c[i]*c[i] || a[i]*a[i] + c[i]*b[i] == b[i]*c[i]){
			cout<<"YES"<<endl;
		}
		else cout<<"NO"<<endl;
	}
}

C++: #include <stdio.h>
#include <math.h>
int trianglechecker(int x, int y, int z);
int main(void){
    int loop, len1, len2, len3;
    int f = 0;
    scanf("%d", &loop);
    for(int i = 0; i < loop; i++)
    {
        scanf("%d%d%d", &len1, &len2, &len3);
        f = trianglechecker(len1, len2, len3);
        if(f == 1)
        {
            printf("YES\n");
        }
        if(f == 0)
        {
            printf("NO\n");
        }
    }
    return 0;
}
int trianglechecker(int x, int y, int z)
{
    if(x * x == y * y + z * z){
        return 1;
    }
    if(y * y == x * x + z * z){
        return 1;
    }
    if(z * z == y * y + x * x){
        return 1;
    }
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

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