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 n;
    int a, b, c;
    cin >> n;
    
    for(int i=0; i<n; i++){
        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" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

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

	cin >> n;

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

		if (a + b == c) {
			cout << "YES";
		}
		else {
			cout << "NO";
		}

		cout << endl;
	}

	return 0;
}

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

int main(){

  int n;

  cin>>n;

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

}

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


int main(){

  int n;
  cin >> n;

  vector <int> array(3,0);

  while(n>0){

    cin >> array[0] >> array[1] >> array[2];

    sort(array.begin(),array.end());

    if(array[0]*array[0] + array[1]*array[1] == array[2]*array[2]){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
    n--;
  }


  return 0;
}

C++: #include<cstdio>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int i,x,suu,cnt;
	int hen[3];
	cnt=0;
	scanf("%d",&suu);
	while(!(suu==cnt)){
		cnt++;
		for(i=0;i<3;i++){
			scanf("%d",&hen[i]);
		}
		sort(hen,hen+3,greater<int>());
		if(hen[2]*hen[2]+hen[1]*hen[1]==hen[0]*hen[0]){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

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

int main(){
	int n=0,i=0,k=0,a,b;
	int x[100] = {0} ;
	char y[100] ={0} ;

	while(1){
	cin >> n ;

	if(n <= 1000) break ;
	}
	for(i=0;i<3*n;i+=3){

		while(1){

		cin >> x[i] >> x[i+1] >> x[i+2] ;

		if((x[i] >= 1) && x[i] <=1000){
			if((x[i+1] >= 1) && x[i+1] <=1000){
				if((x[i+2] >= 1) && x[i+2] <=1000){
					break;
				}
			}
		}
		}
		if(x[i+1] > x[i]) {
			k = x[i+1];
			x[i+1] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i]) {
			k = x[i+2];
			x[i+2] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i+1]) {
			k = x[i+2];
			x[i+2] = x[i+1];
			x[i+1] = k ;
		}
	}

	for(i=0;i< 3*n; i+=3){
				a = x[i] * x[i] ;
		b = (x[i+1] * x[i+1] ) + (x[i+2] * x[i+2]) ;

		if( a == b) cout << "YES" << endl ;
		if( a != b) cout << "NO" << endl ;

	}

    return 0;
}

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

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

int main(int,char**){
	int loops;
	std::cin >> loops;
	int a,b,c;
	while(loops--){
		std::cin >> a >> b >> c;
		if(a*a-b*b-c*c && b*b-c*c-a*a && c*c-a*a-b*b) std::cout << "NO" <<std::endl;
		else std::cout << "YES" <<std::endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][3];
int y = 0;
int temp;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];
}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<5;looper2++)
{
    if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
            if((panjang[looper][y+1]<(panjang[looper][y+2])))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;

    }

    }
}
cout << std;
}
for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << "YES" << endl;
    else cout << "NO" << endl;
}


}

C++: #include<iostream>
#include<cstdio>
using namespace std;
bool yes[1001];
int main()
{
	int n,a,b,c,q,i;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a>>b>>c;
		if(b>a){q=a;a=b;b=q;}
		if(c>a){q=a;a=c;c=q;}
		if((a*a)==(b*b)+(c*c))yes[i]=true;
		else yes[i]=false;
	}
	for(i=1;i<=n;i++)
	{
		if(yes[i]==true)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(){
  int a[3];
  int temp;
  int i,j;
  for(i=0;i<3;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<2;i++){
    for(j=0;j<2-i;j++){
      if(a[j]<a[j+1]){
	temp=a[j];
	a[j]=a[j+1];
	a[j+1]=temp;
      }
    }
  }
  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;

void solve()
{
	int t;
	cin >> t;
	while(t--)
	{
		int Data[3];
		for(int i = 0; i < 3; ++i)
		{
			cin >> Data[i];
		}
		if((Data[0] * Data[0] + Data[1] * Data[1] == Data[2] * Data[2]) ||
			(Data[1] * Data[1] + Data[2] * Data[2] == Data[0] * Data[0]) || 
			(Data[0] * Data[0] + Data[2] * Data[2] == Data[1] * Data[1]))
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[n],a2;
  int b[n],b2;
  int c[n],c2;
  int ans,ans2;
  for(int i=0;i<n;i++){
    cin >> a[i] >> b[i] >> c[i];
    int m[] = {a[i],b[i],c[i]};
    sort(m,m+3,greater<int>());
    a2 = m[0];
    b2 = m[1];
    c2 = m[2];
    ans = a2 * a2;
    ans2 = b2 * b2 + c2 * c2;
    if(ans==ans2){
      cout << "YES" <<endl;
    }
    else cout << "NO" <<endl;
  }
  return 0;
}

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