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 <stdio.h>
int main(void){
    int i,N,a,b,c;
    scanf("%d",&N);
    for(i=1;i<=N;i++){
        scanf("%d %d %d",&a,&b,&c);
    if ((a + b > c && a + c > b && b + c > a)
      && (a > 0 && b > 0 && c > 0)) {
        printf("YES\n");
    }
  else {
    printf("NO\n");
  }  
      }
    return 0;
}

C++: #include <iostream>
using namespace std;
  
//0003
int main(){
    int n;
    int a, b, c, a2, b2, c2;
    cin >> n;
    while(n--){
        cin >> a >> b >> c;
        a2 = a*a;
        b2 = b*b;
        c2 = c*c;
 
        if(a2==b2+c2 || b2==a2+c2 || c2==a2+b2){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: /*
???????????£?????´??°?????\?????????????????????????????????????????¨??????????§???¢???
??´?§?????§???¢??§????????´????????? YES ??????
????????´????????? NO ??¨????????????????????°?????????????????????????????????
*/

#include <iostream>


using namespace std;
 
int main()
{

	int a, b, c, d1, d2, d3, i, N = 0;

		cin >> N;

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

		d1 = a * a;
		d2 = b * b;
		d3 = c * c;

		if ( d1 == ( b * b ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else if ( d2 == ( a * a ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else if ( d3 == ( a * a ) + ( b * b ) ) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main()
{
	int nNum=0;
	cin>>nNum;
	int nIn[3]={0};
	while(nNum--)
	{
		cin>>nIn[0]>>nIn[1]>>nIn[2];
		int nMax=max(max(nIn[0],nIn[1]),nIn[2]);
		if(nMax*nMax==nIn[0]*nIn[0]+nIn[1]*nIn[2]+nIn[2]*nIn[2]-nMax*nMax)
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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

int N ;
int a,b,c,x,y,z ;

int main()
{
	cin >> N ;

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

		x = max( a, max( b, c ) ) ;
		y = min( a, max( b, c ) ) ;
		z = min( a, min( b, c ) ) ;

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

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

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

using namespace std;

int main(int argc, char** argv)
{
    int num;

    cin >> num;
    for (int i = 0; i < num; i++) {
        vector<int> v = vector<int>(3);
        cin >> v[0] >> v[1] >> v[2];
        sort(v.begin(), v.end());
        if (v[0] * v[0] + v[1] * v[1] == v[2] * v[2]) {
            cout << "YES\n";
        } else {
            cout << "NO\n";
        }
    }
    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 || b+c==a || c+a==b)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

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

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

	int a[n], b[n], c[n];

	for(int i=0; i<n; i++){
		if(a[i]*a[i] == b[i]*b[i] + c[i]*c[i]){
			cout << "YES" << endl;
			continue;
		}
		if(b[i]*b[i] == a[i]*a[i] + c[i]*c[i]){
			cout << "YES" << endl;
			continue;
		}
		if(c[i]*c[i] == b[i]*b[i] + a[i]*a[i]){
			cout << "YES" << endl;
			continue;
		}
		cout << "NO" << endl;
	}

	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[1000]={0},y[1000]={0},z[1000]={0},hantei[1000]={0};
	int j=0,e =0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<1 || 1000<x[j] || y[j]<1 || 1000<y[j] || z[j]<1 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
		}
	   
	switch(hantei[i])
	    {
		   case 0:
			  printf("No\n");
			  break;
		   case 1:
			  printf("Yes\n");
		      break;
	   }
	}

	return 0;
}

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

int main()
{ 
	int a, b, c, n;
	cin >> n;
	for (int i = 1; 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 <cstdio>
#include <cmath>

bool triangle(int x, int y, int z) {
	return pow((double)x, 2) + pow((double)y, 2) == pow((double)z, 2);
}

int main(void) {
	int n;
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		int x, y, z;
		scanf("%d %d %d", &x, &y, &z);
		if(triangle(x, y, z) || triangle(y, x, z) || triangle(z, x, y))
			printf("YES\n");
		else
			printf("NO\n");
	}
	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;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n,a,b,c,x;
	int arry[1024];
	cin >> n;
	for(int i=0;i<n;i++){
		cin >> a >> b >> c;

		if(a > c){
			x = c;
			c = a;
			a = x;
		}
		if(b > c){
			x = c;
			c = b;
			b = x;
		}

		if(a*a + b*b == c*c){
			arry[i] = 1; 
			}
		else
			arry[i] = 0;
	}
	for(int i=0;i<n;i++){
		if(arry[i]==1){
			cout << "YES" << endl;
		}
		else if(arry[i]==0)
			cout << "NO" << endl;
		}

	return 0;
}

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

int main()
{
	int iN, Temp;
	int iNum[3], iTrueFlag[1000];

	cin >> iN;

	for( int i=0; i<iN; i++ ){
		cin >> iNum[0] >> iNum[1] >> iNum[2];

		for( int j = 0; j < 3; j++ ){
			for( int k = j + 1; k < 3; k++ ){
				if( iNum[j] > iNum[k] ){
					Temp    = iNum[j];
					iNum[j] = iNum[k];
					iNum[k] = Temp;
				}
			}
		}

		if( (iNum[0] * iNum[0]) + (iNum[1] * iNum[1]) == (iNum[2] * iNum[2]) ) iTrueFlag[i] = 1;
		else																   iTrueFlag[i] = 0;

	}

	for( int i=0;i<iN;i++ ){
		if( iTrueFlag[i] == 1 ) cout << "YES" << endl;
		else				    cout << "NO" << endl;
	}

	return 0;
}

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