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>
#include <vector>
using namespace std;

int main()
{
	int i,b,c,d;
	vector< int > a;

	cin >> i;
	for(int j=0; j<i; j++){
		cin >> b >> c >> d;
		a.push_back( b );
		a.push_back( c );
		a.push_back( d );
		sort(a.begin(), a.end());
		if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
}

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

using namespace std;

int main() {
	int n; cin >> n;
	for (int j = 0; j < n; ++j){
	int edges[3];
	for (int i = 0; i < 3; ++i)
		cin >> edges[i];
	sort(edges, edges+3);

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

	return 0;
}

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

using namespace std;

int main()
{
    int N;
    cin >> N;

    for (int i = 0; i < N; i++)
    {
        double a, b, c, l;
        cin >> a >> b >> c;
        if (max({a, b, c}) == c)
        {
            if (a * a + b * b == c * c)
                cout << "YES" << endl;
            else
                cout << "NO" << endl;
        }
        else if (max({a, b, c}) == b)
        {
            if (a * a + c * c == b * b)
                cout << "YES" << endl;
            else
                cout << "NO" << endl;
        }
        else if (max({a, b, c}) == a)
        {
            if (c * c + b * b == a * a)
                cout << "YES" << endl;
            else
                cout << "NO" << endl;
        }
        else
            cout << "NO" << endl;
    }
    return 0;
}

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

int N;
int a, b, c;

int main(){
    scanf("%d", &N);
    for(int i= 0; i <N; ++i) {
        cin >> a >> b >> c;   
    
        string ans;
        if (a > b && b > c){
            ans = pow(a,2) == pow(b,2) + pow(c,2) ? "YES" : "NO";
    } else if (b > a && b > c){
        ans = pow(b,2) == pow(a,2) + pow(c,2) ? "YES" : "NO";
    }else {
        ans = pow(c,2) == pow(a,2) + pow(b,2) ? "YES" : "NO";
    }
    cout << ans << endl;
    }
}

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

int main(){
	int n;
	cin>>n;
	
	for(int i=0;i<n;i++){
		int data[3],tmp;
		cin>>data[0]>>data[1]>>data[2];
		
		for(int j=0;j<2;j++){
			if(data[j]>data[j+1]){
				tmp=data[j];
				data[j+1]=data[j];
				data[j]=tmp;
			}
		}
		if(data[0]*data[0]+data[1]*data[1] == data[2]*data[2]){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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


int main(){

  int n;
  cin >> n;

  vector <int> array(n,0);

  for(int i = 0; i < n;i++){

    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;
    }
  }


  return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
int i, n,j,cnt = 0;
scanf("%d",&n);tri[3];
for (i = 0; i < n; i++){
for (j = 0; j < 3; j++){
scanf("%d",tri[i]);
}
sort(tri,tri+3);
if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++;
}
printf("%d\n",cnt);
return 0;
}

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

bool solve(int x,int y,int z) ;

bool ans = false ;

int main()
{
	int N ;
	cin >> N ;

	bool ans = false ;

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

		if( a > b )
		{
			if( a > c )		// 最大値はa
			{
				ans = solve(a,b,c) ;
			}
			else if( a < c )	// 最大値はc
			{
				ans = solve(c,a,b) ;
			}
		}
		else if( a < b )
		{
			if( b > c )		// 最大値はb
			{
				ans = solve(b,a,c) ;
			}
			else if( b < c )	// 最大値はc
			{
				ans = solve(c,a,b) ;
			}
		}

		if( ans == true ){ cout << "YES" << "\n" ; }
		else{ cout << "NO" << "\n" ; }
	}

	_getch() ;
	return 0 ;
}

bool solve(int x,int y, int z)
{
	if( x*x == (y*y + z*z) )
	{
		return true ;
	}
	else
	{
		return false ;
	}
}

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

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

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

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

    cin >> n;
    for (int i=0; i<n; i++) {
        cin >> a >> b >> c;
        int d[3] = {a, b, c};
        sort(d, d+3);
        if (d[2] == sqrt(pow(d[0], 2) + pow(d[1], 2))) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

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

  cin>>n;
  for(int i=0; i<n; i++)
    cin>>a[i]>>b[i]>>c[i];
    
  for(int i=0; i<n; i++){
    m = max(a[i],b[i]);
    m = max(m,c[i]);
    if(m == a[i]){
      if(a[i] * a[i] == b[i] * b[i] + c[i] * c[i])
	ans[i] = "YES";
      else
	ans[i] = "NO";
      continue;
    }
    if(m == b[i]){
      if(b[i] * b[i] == a[i] * a[i] + c[i] * c[i])
	ans[i] = "YES";
      else
	ans[i] = "NO";
      continue;
    }
    if(m == c[i]){
      if(c[i] * c[i] == a[i] * a[i] + b[i] * b[i])
	ans[i] = "YES";
      else
	ans[i] = "NO";
    }
  }

  for(int i=0; i<n; i++)
    cout<<ans[i]<<endl;

  return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[3];
  rep(i,n){
    rep(j,3){
      cin >> a[j];
    }
    sort(a,a+3);
    rep(i,3) cout << a[i] << " ";
    if(pow(a[2],2) == pow(a[0],2)+pow(a[1],2)) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}

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

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

C++: 3
4 3 5
4 3 6
8 8 8