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<algorithm>
using namespace std;



//int main(){
// int a[10];
// for(int i=0;i<10;i++){
//  cin>>a[i];
// }
// sort(a,a+10);
// for(int i=9;i>6;i--)
//  cout<<a[i]<<endl;
//return 0;
//}


//int main(){
//	int a,b,ans;
//	while(cin>>a>>b){
//		a+=b;
//		ans=1;
//		while(a/10){
//			a/=10;
//			ans++;
//			}
//		cout<<ans<<endl;
//	}
//	return 0;
//}

int main(){
	int n,a[3];
	cin>>n;
	for(int i=0;i<n;i++){
		for(int j=0;j<3;j++)
			cin>>a[j];
		sort(a,a+3);
		cout<<((a[0]*a[0]+a[1]*a[1]-a[2]*a[2])?"NO":"YES")<<endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <math.h>
#include <queue>
#include <vector>
using namespace std;

int main()
{
	double a,b,c;
	int n,i;
	priority_queue< double, vector<double>, greater<double> > que;

	scanf("%d",&n);

	for(i = 0; i < n; i++){
		scanf("%lf %lf %lf",&a,&b,&c);
		que.push(a);
		que.push(b);
		que.push(c);
		a = que.top();
		que.pop();
		b = que.top();
		que.pop();
		if(pow( que.top(),2.0 ) == pow( a,2.0 ) + pow( b,2.0 )){
			printf("YES\n");
		}
		else{
			//printf("%lf %lf\n",pow( que.top(),2.0 ),pow( a,2.0 ) + pow( b,2.0 ));
			printf("NO\n");
		}
		que.pop();
	}

	return 0;
}

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

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;
		if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) cout << "YES\n";
		else cout << "NO\n";
	}
}

C++: #include <iostream>

using namespace std;

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

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

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

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

using namespace std;

int main()
{
    int N, a[4];
    cin >> N;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < 3; j++) {
            cin >> a[j];
        }
        sort(a, a + 3);
        cout << (a[0]*a[0] + a[1]*a[1] == a[2]*a[2] ? "YES" : "NO") << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

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

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

int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

  int i, n, a, b, c;
  vector<int> triangle;
  cin >> n;

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

    sort(triangle.begin(), triangle.end());
    if (triangle.at(0) * triangle.at(0) + triangle.at(1) * triangle.at(1) == triangle.at(2) * triangle.at(2)) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }

    triangle.clear();
  }

  return 0;
}

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

int main()
{
    vector<int> a(3);
    cin >> a[0];
    while (cin >> a[0] >> a[1] >> a[2])
    {
        sort(a.begin(), a.end());
        if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <sstream>
using namespace std;
void swap(int idx1, int idx2, int *node)
{
	int f = node[idx1];
	node[idx1] = node[idx2];
	node[idx2] = f;
}
//nlogn
void quickSort(int left, int right, int *node)
{
	int pl = left;
	int pr = right;
	int pivot_f = node[(pl + pr) / 2];
	do
	{
		while (node[pl] < pivot_f)
		{
			pl++;
		}
		while (node[pr]> pivot_f)
		{
			pr--;
		}
		if (pl <= pr)
		{
			swap(pl++, pr--, node);
		}
	} while (pl <= pr);
	if (left < pr) quickSort(left, pr, node);
	if (pl <= right) quickSort(pl, right, node);
}

bool compare(int a, int b)
{
	if (a == b)
	{
		return true;
	}
	else {
		return false;
	}
}
int main()
{
	int max = 0;
	cin >> max;
	for (int num = 0; num <= max; num++)
	{
		string str;
		string item;
		vector<string> list;
		getline(cin, str);
		int edge[3];
		stringstream ss(str);
		while (getline(ss, item, ' ') && !item.empty()) {
			list.push_back(item);
		}
		
		edge[0] = stoi(list[0].c_str());
		edge[1] = stoi(list[1].c_str());
		edge[2] = stoi(list[2].c_str());
		quickSort(0, 2, edge);

		int edge1 = edge[2] * edge[2];
		int edge2 = edge[0] * edge[0] + edge[1] * edge[1];
		if (compare(edge1, edge2))
		{
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

C++: #include <iostream>
using namespace std;
int main(){
	int num;
	cin >> num;
	int count;
	for(count=0; count<num; count++){
	    int a,b,c;
	    cin >> a >> b >> c;
	    //using Pythagorean theorem
	    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;
	    }
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
using namespace std;

int main(){
	double sd[3];
	int N;
	cin>>N;
	while(N>0){
		cin>>sd[0]>>sd[1]>>sd[2];
		sort(sd,sd+3);
		if(sd[2] == sqrt(pow(sd[1],2.0)+pow(sd[0],2.0))){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
		N--;
	}
	
	
	return 0;
}