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 <iostream>
#include <string>
#include <cctype>
#include <cmath>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <map> // pair
#include <set>
#define MAXSIZE 200000
#define PI 3.141592653589
using namespace std;

template<typename T>
T add(T a,T b){
  return a+b;
}

namespace A
{
  int f(void){
    return 1;
  }
}

int main(){
  int n;
  std::cin >> n;

  for(int i=0;i<n;i++){
    int a,b,c;
    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 << "YES" << '\n';
    }else{
      std::cout << "NO" << '\n';
    }
  }

}

C++: #include <iostream>
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==a*a+c*c ||
  c*c==a*a+b*b
  )
  cout << "YES" << endl;
 else 
  cout << "NO" << endl;
 }
return 0;
}

C++: #include <cstdio>

int main()
{
	int N, ia, ib, ic;
	int iTrueFlag[1000];

	scanf("%d",&N);

	for( int i=0;i<N;i++ ){
		scanf("%d %d %d",&ia, &ib, &ic);

		if( (ia*ia) + (ib*ib) == (ic*ic) )
			iTrueFlag[i] = 1;
		else
			iTrueFlag[i] = 0;
	}

	for( int i=0;i<N;i++ ){
		if( iTrueFlag[i] == 1)
			printf("YES\n");
		else
			printf("NO\n");
	}

	return 0;
}

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

using namespace std;
int main()
{
	int n;
	cin >> n;
	
	for(int i=0;i<n;i++){
			int a,b,c,max,min,mid;
			cin >> a >> b >> c;
			max(a,b,c)=max;
			min(a,b,c)=min;
			if(a!=max&&a!=min){	
				a=mid;
			}if(b!=max&&b!=min){
				b=mid;
			}if(c!=max&&c!=min){
				c=mid;
			}
		if(min*min+mid*mid>=max*max){
			cout<< "YES" << endl;
		}else{
			cout<< "NO" << endl;
		}
	}
	return 0;
}

C++: #include <stdio.h>
#include <math.h>

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	long int rec,i,j,t,count;
	long int n[3]={0,0,0};
	
	scanf("%d",&t);
	
	for(i=0;i<t;i++){
		for(j=0;j<3;j++){
			scanf("%ld",&rec);
			if(rec==0){
				count=1;
			}
			if(rec>n[0]){
				n[2]=n[1];
				n[1]=n[0];	
				n[0]=rec;
			}else if(rec>n[1]){
				n[2]=n[1];
				n[1]=rec;
			}else if(rec>n[2]){
				n[2]=rec;
			}
		}
		if(count=1){
			printf("NO\n");
		}else if(n[0]*n[0]==n[1]*n[1]+n[2]*n[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	
	return 0;
}

C++: //#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
//#include <cstdio>
//#include <cstdlib>
//#include <cmath>
#include <iostream>
#include <algorithm>
//#include <cstring>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>
#include <set>
using namespace std;

int main(void){

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

	return 0;
}

/*
for(i=0;i<N;i++){
	cin >> X[i];
}


for(i=0;i<N;i++){
	for(j=0;j<N;j++){
		cin >> X[i][j];
	}
}
*/

C++: #include <iostream>

using namespace std;

int main(void)
{
	int i;
	int a[3];

	for(i = 0; i < 3; i++){
		cin >> a[i];
	}
	a[0] = a[0]^2;
	a[1] = a[1]^2;
	a[2] = a[2]^2;

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

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

int main(void) {
    int num; cin >> num;
    for(int r = 0; r <  num; r++) {
        int a, b, c; cin >> a >> b >> c;
        if(a*a + b*b == c*c) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return(0);
}

C++: #define _USE_MATH_DEFINES
#include <cmath>

#include <iostream>
#include <string>

using namespace std;

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

C++: #include<iostream>

using namespace std;

int main(){

	int num,i,j;
	
	cout << "the number of data set: ";
	cin >> num;
	
	int a[num],b[num],c[num];
	
	for(i=0;i<num;i++){
		cin >> a[i] >> b[i] >> c[i];
	}
	
	int triangle[3];
	for(i=0;i<num;i++){
		triangle[0] = a[i];
		triangle[1] = b[i];
		triangle[2] = c[i];
		
		int max,max_num;
		max = triangle[0];
		max_num = 0;
		for(j=0;j<3;j++){
			if(max<triangle[j]){
				max = triangle[j];
				max_num = j;
			}
		}
		switch(max_num){
			case(0):if(a[i]*a[i] == b[i]*b[i] + c[i]*c[i]) cout << "YES\n";
					else cout << "NO\n";
					break;
			case(1):if(b[i]*b[i] == a[i]*a[i] + c[i]*c[i]) cout << "NO\n";
					else cout << "NO\n";
					break;
			case(2):if(c[i]*c[i] == a[i]*a[i] + b[i]*b[i]) cout << "YES\n";
					else cout << "NO\n";
					break;
			default:break;
		}
	}
	
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define ll long long
#define pb push_back

# define inOut(a,b) freopen(a,"r",stdin);freopen(b,"w",stdout);
# define RESET(a) memset(a,0,sizeof(a))
# define MEMO(a) memset(a,-1,sizeof(a))
# define DEBUG puts("Debug-Has-Come-Until-Here")


typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

int main(){
	cin.tie(NULL);

	int T, arr[5];
	scanf("%d", &T);
	while(T--){
		scanf("%d %d %d", &arr[1], &arr[2], &arr[3]);
		sort(arr+1, arr+4);
		if (arr[1]*arr[1] + arr[2]*arr[2] == arr[3]*arr[3])
			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) || (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<math.h>
using namespace std;

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

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

        int a2, b2, c2;
        a2 = pow(a,2);
        b2 = pow(b,2);
        c2 = pow(c,2);

        if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include <iostream>
#include <cmath>
 
using namespace std;
 
int main(){
	int a, b, c, n;
	
	cin >> n;

	for(int i=0; i<n; i++){
		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"<<endl;
	else cout<<"NO"<<endl;
	}

	return 0;

}

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