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>
using namespace std;
int main(){
    int a,b,c,count=0,n;
    cin>>n;
    while(cin>>a>>b>>c){
        count++;
    if(a*a==b*b+c*c||b*b==c*c+a*a||c*c==a*a+b*b)  cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
        if(count==n)break;
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;



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

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

bool is_Right_Triangle(int a, int b, int c){
  if(a > b) swap(a, b);
  if(a > c) swap(a, c);
  if(b > c) swap(b, c);
  if(a*a + b*b == c*c) return true;
  return false;
}

int main(){
  int n;
  cin >> n;
  int a, b, c;
  while(n--){
    cin >> a >> b >> c;
    printf("%s\n", is_Right_Triangle(a, b, c) ? "YES" : "NO");
  }
  return 0;
}

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;
			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>
#include <vector>
#include <algorithm>
#include <functional>

using namespace std;

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

C++: #include <stdio.h>
//#include <iostream>
//#include <cstdlib>
//#include <cstring>

//using namespace std;

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

  scanf("%d",&n);

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

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

C++: #include <stdio.h>
#include <algorithm>
#include <vector>
using namespace std;
vector<int>v;
int main(void)
{
    int testCase,n;
    scanf("%d",&testCase);
    while(testCase--){
        v.clear();
        int i=3;
        while(i--){
            scanf("%d",&n);
            v.push_back(n);
        }
        sort(v.begin(),v.end());
        if((v[0]*v[0]+v[1]*v[1])==(v[2]*v[2]))printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int righttriangle(int a,int b,int c){
	a*=a;b*=b;c*=c;
	if(a+b==c||b+c==a||a+c==b)return 1;
	else return 0;}
int main(){
	int n,a,b,c,i,j[1000];
	cin>>n;
	for(i=0;i<n;i++){
		cin>>a>>b>>c;
		j[i]=righttriangle(a,b,c);}
	for(i=0;i<n;i++){
		if(j[i])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;}
	return 0;}

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

int main(void) {
    priority_queue<int, vector<int>, greater<int>> que;
    int num;
    cin >> num;
    for(int r = 0; r < num; r++) {
        int a, b, c;
        cin >> a >> b >> c;
        que.push(a); que.push(b); que.push(c);
        a = que.top(); que.pop(); b = que.top(); que.pop(); c = que.top(); que.pop();
        if(a * a + b * b == c * c) printf("YES\n");
        else printf("NO\n");
    }
    
    return(0);
}

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;
		if(a*a+b*b==c*c||a*a+c*c==b*b||a*a==b*b+c*c){
			cout<<"Yes"<<endl;
		}else{
			cout<<"No"<<endl;
		}
	}
}

C++: #include <iostream>
using namespace std;
#define max(x, y) ((x) > (y) ? (x) : (y))
#define min(x, y) ((x) < (y) ? (x) : (y))

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++){
		int x, y, z;
		cin >> x >> y >> z;
		int ma = max(x, max(y, z));
		int mi = min(x, min(y, z));
		int cen = (ma != x && mi != x ? x : ma != y && mi != y ? y : z);
		if (ma * ma == mi * mi + cen * cen){
			cout << "YES" << "\n";
		}else{
			cout << "NO" << "\n";
		}
	}
	cout.flush();
}

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

int main(void){
	int N,a,b,c,d=0,tmp;
	cin>>N;
	for(int i=1;i<=N;i++){
		
		cin>>a>>b>>c;
		
		if(a>b){
			tmp=a;
			a=b;
			b=tmp;
		}
		if(b>c){
			tmp=b;
			b=c;
			c=tmp;
		}
		if(a>b){
			tmp=a;
			a=b;
			b=tmp;
		}
	
		if(a==b){
			d=d+((a*a)%1);
			d=d+((b*b)%1);
			d=d+((c*c)%2);
		}
		else{
			d=d+((a*a)%1);
			d=d+((b*b)%4);
			d=d+((c*c)%3);
		}
		
		if(d==0){
			cout<<"No"<<endl;
		}
		else{
			cout<<"Yes"<<endl;
		}
	}
		return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a[4] = { 0 }, j, b, cnt, i, n, A = 0, B = 0, c, ruio;
	scanf("%d", &n);
	for (ruio = 0; ruio < n; ruio++) {
		scanf("%d %d %d", &a[0], &a[1], &a[2]);
		for (i = 0; i < 3; i++) {
			for (j = i; j < 3; j++) {
				if (a[i] < a[j]) {
					c = a[i];
					a[i] = a[j];
					a[j] = c;
				}
			}
		}
		if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2]) {
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
	}
	}

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

#define pb push_back
#define fr first
#define sc second
typedef pair<int,int> pii;
typedef vector<int> vi;
const int INF = (1<<25);
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

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