Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"sort"
	"strconv"
	"strings"
)

func sliceAtof64(sa []string) ([]float64, error) {
	si := make([]float64, 0, len(sa))
	for _, a := range sa {
		i, err := strconv.ParseFloat(a, 64)
		if err != nil {
			return si, err
		}
		si = append(si, i)
	}
	return si, nil
}

func answer(ans bool) {
	if ans {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
func isRightTriangle(ary []float64) (ans bool) {
	sort.Sort(sort.Reverse(sort.Float64Slice(ary)))
	ans = math.Pow(ary[1], 2.0)+math.Pow(ary[2], 2.0) == math.Pow(ary[0], 2.0)

	return
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	lineCount, _ := strconv.Atoi(scanner.Text())
	lines := make([]string, lineCount)

	for i := 0; i < lineCount; i++ {
		scanner.Scan()
		lines[i] = scanner.Text()
	}

	for _, v := range lines {
		ary, _ := sliceAtof64(strings.Split(v, " "))
		answer(isRightTriangle(ary))
	}
}

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

int main(void)
{
	int T;
	cin >> T;

	for(int i = 1, a, b, c; i <= T; 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>
#include <algorithm>

using namespace std;
 
int main() {
 int kaisu;
 int x,y,z;
 int kekka;

 cin >> kaisu;

 for(int i = 1; i <= kaisu; i++){
 cin >> x >> y >> z;
 int array[3];
 array[0] = x;
 array[1] = y;
 array[2] = z;
 if( array[0] < array[1] ){
 swap(array[0],array[1]);
 }
 if( array[0] < array[2] ){
 swap(array[0],array[2]);
 }
 if( array[1] < array[2] ){
 swap(array[1],array[2]);
 }

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

 }
 
return 0;
 }

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


using namespace std;

bool isTri(int a, int b, int c){
  if(max(a, b) < c){
    if(pow(c, 2.0) == pow(a, 2.0) + pow(b, 2.0)){
      return true;
    }
  }else{
    if(pow(max(a, b), 2.0) == pow(min(a, b), 2.0) + pow(c, 2.0)){
      return true;
    }
  }
  return false;
}


int main(){
  int a, b, c;
  int num;
  cin >> num;
  
  while(cin >> a >> b >> c){
    if(isTri(a, b, c)){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
    
}

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

int main() {
  int ct = 0;
  vector<int> v(3);

  scanf("%d", &ct);
  for(int i = 0; i < ct; i++) {
    scanf("%d %d %d", &v[0], &v[1], &v[2]);
    sort(v.begin(), v.end());
    printf("%s\n", v[2]*v[2] == v[0] * v[0] + v[1] * v[1] ? "YES" : "NO");
    v.clear();
  }
  return 0;
}

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

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

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

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

	return 0;
}

C++: 
#include<stdio.h>
#include<math.h>
int main()
{
	int n,tmp;
	double a, b, c;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d %d %d", &a, &b, &c);
		if (a > b)
		{
			tmp = a;
			a = b;
			b = tmp;
			if (b > c)
			{
				tmp = c;
				c = b;
				b = a;
				a = tmp;
				if (a > b)
				{
					tmp = a;
					a = b;
					b = tmp;
				}
			}
			else if (a > c)
			{
				tmp = c;
				c = a;
				a = c;
			}
		}
		else if (a > c)
		{
			tmp = c;
			c = a;
			a = c;
		}
		pow(c, 2.0);
		if (c= a*a + b*b)
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	return 0;
}

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

int main(){
	int num;//number of data sets
	int temp;

	cin >> num;

	int a[num],b[num],c[num];
	double x,y,z;

	for (int i = 0; i < num; i++)
	{
		cin >> a[i] >> b[i] >> c[i];
	}

	//直角三角形の判別
	for (int i = 0; i < num; i++)
	{
		if (a[i] > b[i])
		{
			temp = a[i]; 
			a[i] = b[i]; 
			b[i] = temp;
		}
		if (b[i] > c[i])
		{
			temp = b[i];
			b[i] = c[i];
			c[i] = temp;
		}

		x = c[i]*c[i];
		y = a[i]*a[i];
		z = b[i]*b[i];

		if(x == (y + z)){
			cout << "YES" << endl;
		} else{
			cout << "NO" << endl;
		}

	}

	return 0;
}

C++: #include<iostream>

using namespace std;

//??\?????????
void swap(int *a, int *b){
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main(){

	int num,i,j;
	
	cin >> num;
	
	int a[num],b[num],c[num];
	
	for(i=0;i<num;i++){
		cin >> a[i] >> b[i] >> c[i];
	}
	
	int t[3];
	for(i=0;i<num;i++){
		t[0] = a[i];
		t[1] = b[i];
		t[2] = c[i];
		
		int max,str;
		str = 1;
		while(str<=3){
			max = t[str-1];
			for(j=str;j<3;j++){
				if(max<t[j]){
					max = t[j];
					swap(t[str-1],t[j]);
				}
			}
			str++;
		}
		if(t[0]*t[0]==t[1]*t[1]+t[2]*t[2])
			cout << "YES\n";
		else cout << "NO\n";
	}
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
    vector<int> a;
    int n;
    cin>>n;
    while(n--){
        int t;
        for(int i=0;i<3;i++){
            cin>>t;
            a.push_back(t);
        }
        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<queue>
using namespace std;

#define F(I,J,N) for(int I=J;I<N;I++)

int main(){
	priority_queue<int> q;
	int n,a,b,c;
	cin>>n;
	F(i,0,n){
		cin>>a>>b>>c;
		q.push(a);q.push(b);q.push(c);
		a=q.top();q.pop();b=q.top();q.pop();c=q.top();q.pop();
		bool f=false;
		if(a*a==(b*b+c*c)) f=true;
		if(f) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include <iostream>

inline bool is_right_triangle(const u_int a, const u_int b, const u_int c) {
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}

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

    std::cin >> n;
    for (u_int i = 0; i < n; ++i) {
        std::cin >> a >> b >> c;
        std::cout << is_right_triangle(a, b, c) ? "YES\n" : "NO\n";
    }

    return 0;
}

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

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

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

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

scans(" %d",&n);

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

return 0;
}

C++: #include <iostream>
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" ; }
	}
	return 0 ;
}

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