Go: package main

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

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		cols := sort.StringSlice(strings.Split(sc.Text(), " "))
		cols.Sort()
		for i, c := range cols {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

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

int main()
{
	int a, b, c, d, e;
	int ans;
	
	cin >> d;
		for(int i = 0; i < d; i++)
		{
			cin >> a >> b >> c;
			
			if(a > b && a > c)
			{
					e = c;
					c = a ;
					
					ans = c * c - e * e - b * b;
				if(ans == 0)
				{
					cout << "YES" << endl;
				}
				else
				{
					cout << "NO" << endl;
				}
			}
	
			else if (b > c && b > a)
			{
				e = c;
				c = b;
			
					ans = c * c - e * e - a * a;
					if(ans == 0)
					{
						cout << "YES" << endl;
					}
					else
					{
						cout << "NO" << endl;
					}
			}
			else 
			{
				ans = c * c - a * a - b * b;
				if(ans == 0)
				{
					cout << "YES" << endl;
				}
				else
				{
					cout << "NO" << endl;
				}
			}
		}
			
	return 0;
}

C++: #include<stdio.h>
/*複数のデータセットに対して、各々が直角三角形か
どうか判定する*/
void right_triangle(int x, int y, int z);

int main(void)
{
    int n;//nはデータセットの個数
    scanf("%d", &n);
    for ( int i = 0; i <n ; ++i){
    int a, b, c;//a,b,cは辺の長さ
    scanf("%d %d %d", &a, &b, &c);
    right_triangle(a , b, c);
    }
    return 0;
}    

void right_triangle( int x, int y, int z)
{
    x *= x;
    y *= y;
    z *= z;
    if (x == y + z|| y == z + x|| z == x + y){
        printf("YES\n");
    }else{
        printf("NO\n");
    }
}

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

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

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

int main(){
    int length[3];
    int n,A,B,C;
    scanf("%d",&n);
 
    for(int i=0;i<n;i++){
        cin >> length[0] >> length[1] >> length[2];       
        A = length[0] * length[0];
        B = length[1] * length[1];
        C = length[2] * length[2];
        if(A+B==C||B+C==A||C+A==B){
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl;
        }
    }
}

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

using namespace std;

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

C++: #include<iostream>

int main(void){
	int a,b,c,n,i;
	std::cin>>n;
	for(i=0;i<n;i++){
		std::cin>>a;
		std::cin>>b;
		std::cin>>c;
		if(a*a==b*b+c*c)std::cout<<"YES"<<std::endl;
		else if(b*b==a*a+c*c)std::cout<<"YES"<<std::endl;
		else if(c*c==a*a+b*b)std::cout<<"YES"<<std::endl;
		else std::cout<<"NO"<<std::endl;

		}

	return 0;
}

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 (2 * max(max(a,b),c) * max(max(a,b),c) == a*a+b*b+c*c ) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n,edge[3];
	cin >>n;
	while(n--){
		cin>>edge[0]>>edge[1]>>edge[2];
		if(edge[0]*edge[0]+edge[1]*edge[1] == edge[2]*edge[2] || edge[1]*edge[1]+edge[2]*edge[2] == edge[0]*edge[0] || edge[2]*edge[2]+edge[0]*edge[0] == edge[1]*edge[1]){cout <<"YES"<<endl;}
		else{cout<<"NO"<<endl;}
	}
	return 0;
}

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

int main(void)
{
    int n;
    cin >> n;
    while (n-- > 0)
    {
        int a, b, c;
        cin >> a >> b >> c;
        a *= a;
        b *= b;
        c *= c;
        if (a + b == c || b + c == a || a + c == b)
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    return 0;
}

C++: #include<iostream>

bool right_triangle(int a,int b,int c)
{
    if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) {
        return true;
    }else{
        return false;
    }   
}

int main()
{
    int x,y,z,N;
    std::cin >> N;
    for (int i = 0; i < N; i++) {
        std::cin >> x >> y >> z;
        if (right_triangle(x,y,z)) {
            std::cout << "Yes" << std::endl;
        }else if (right_triangle(x,y,z) == 0 ) { 
            std::cout << "No" << std::endl;
        }
    }   
    return 0;
}                                                         1,1          ??????

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

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

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

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

C++: #include<iostream>
#include<cmath>
using namespace std;
int main(){
	int t,s=-1,j;
	cin>>t;
	while(t--){
		int a[3],x=0;
		for(int i=0;i<3;i++){
			cin>>a[i];
			if(s<a[i]) j=i;
			x+=a[i];
		}
	    x-=a[j];
	    if(x<a[j]) cout<<"NO"<<endl;
	    else{
	    	x=0;
	    	for(int i=0;i<3;i++){
	    	 a[i]=pow(a[i],2);
	    	 if(i!=j) x+=a[i];
	        }
	        if(a[j]==x) cout<<"YES"<<endl;
	        else cout<<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include <stdio.h>
     
int triJudgefunc(int x, int y, int z);
     
int main(void)
{
    int row;
    scanf("%d", &row);
    for (int i = 0; i < row; ++i) {
        int firstn, secondn ,thirdn; 
        scanf("%d %d %d", &firstn, &secondn, &thirdn);
        if (triJudgefunc(firstn, secondn, thirdn) == 0) {
        printf("YES\n");
        } else {
        printf("NO\n");
        }
    }
    return 0;
}
     
     
     
int triJudgefunc(int x, int y, int z)
{
    int maxlength, notmax1, notmax2;
    if (x > y) {    //x > y
        if (x > z) {
            maxlength = x; notmax1 = y; notmax2 = z;    //x???max
        } else {
            notmax1 = x; notmax2 = y; maxlength = z;    //z???max
        }
    } else {    //y > x
        if (y > z) {
            notmax1 = x; maxlength = y; notmax2 = z;    //y???max
        } else {
            notmax1 = x; notmax2 = y; maxlength = z;    //z???max
        }
    }
    int result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2;
    return result;
}