Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

C++: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AthleteProgramming
{
    class Program
    {
        static void Main()
        {
            int n = int.Parse(Console.ReadLine());
            for(int i = 0; i < n; i++)
            {
                int[] array = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
                Sort(ref array);
                CheckRightTriangle(array);
            }
        }

        static void CheckRightTriangle(int[] array)
        {
            if (array[0] * array[0] == array[1] * array[1] + array[2] * array[2])
            {
                Console.WriteLine("YES");
            }
            else
            {
                Console.WriteLine("NO");
            }
        }

        static void Sort(ref int[] array)
        {
            for(int i = array.Length-1; i >= 0; i--)
            {
                for(int j = 0; j < i; j++)
                {
                    if (array[j] < array[j + 1])
                    {
                        Swap(ref array[j], ref array[j + 1]);
                    }
                }
            }
        }

        static void Swap(ref int a, ref int b)
        {
            int tmp = a;
            a = b;
            b = tmp;
        }

    }
}

C++: //	??´?§?????§???¢ 
#include<iostream>
using namespace std;

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

C++: 
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;
int main()
{
	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[2]*a[2]==a[1]*a[1]+a[0]*a[0]) { 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[0];
			for(j=str;j<3;j++){
				if(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 <algorithm>

using namespace std;

int main()
{
    int num, h, l, r;
    int line[3];

    cin >> num;

    for (int n = 0; n < num; n++)
    {
        for (int i = 0; i < 3; i++)
        {
            cin >> line[i];
        }

        h = 0;
        l = 0;
        r = 0;

        h = *max_element(line, line + num);
//        cout << "max:" << h << endl;

        for (int i = 0; i < 3; i++)
        {
            if (line[i] == h && l == 0)
            {
                l = line[i] * line[i];
            }
            else
            {
                r += line[i] * line[i];
            }
        }

//        cout << "left:" << l << endl;
//        cout << "right:" << r << endl;

        if (l == r)
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int test;
	cin >> test;
	while (test--)
	{
		int a, b, c;
		cin >> a >> b >> c;
		if (a > b) swap(a, b);
		if (b > c) swap(b, c);
		if (a+b > c) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

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

C++: #include <cstdio>
int main(){
 int n,a,b,c,m;
 scanf("%d",&n);
 while(n>0){
  scanf("%d %d %d",&a,&b,&c);
  m=a>b?(a>c?a:c):(b>c?b:c);
  if (a*a+b*b+c*c==2*m*m){  printf("YES\n"); }
  else { printf("NO\n"); }
  --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 tri[3] = {0};
        cin>>tri[0]>>tri[1]>>tri[2];
        sort(tri, tri+3);
        if(tri[0]*tri[0] + tri[1]*tri[1] == tri[2]*tri[2]){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    
    return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int a, b, c;
	while(cin >> a >> b >> c){
		if(a+b <= c || a+c <= b || b+c <= a){
			cout << "NO" << endl;
		}
		else{
			cout << "YES" << endl;
		}
	}
	return 0;
}

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

int main()
{
	int a[3];
	while(cin >> a[0] >> a[1] >> a[2] && a[0] != EOF)
	{
		sort(a,a+3);
		if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2])
			cout << "YES";
		else
			cout << "NO";
		cout << endl;
	}
	
}

C++: #include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main(){
    int n,a[1000],b,c,i[3],f[3],j,max,l,k,gou=0,gou2;
    float opi=4;
    cin>>n;
    for(l=0;l<n;l++){
        for(k=0;k<3;k++){
            cin>>i[k];
            if(i[k]>=1000||i[k]<=0){
                break;
            }
            f[k]=i[k]^2;
        }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
  
using namespace std;
  
int main(void){
  int n,array[3],i;
  
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d",&array[0],&array[1],&array[2]);
    sort(array,array+3);
    if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2])  printf("YES\n");
    else  printf("NO\n");
  }
  
  return 0;
}

C++: //	??´?§?????§???¢ 
#include<iostream>
using namespace std;

int abs(int t) {
	if (t < 0) {
		t = t * -1;
	}
	return t;
}
int main() {
	int a,b,c;
	cin >> a >> b >> c;
	if (a + b > c && a + c > b && b + c > a){
		if ( ((a*a + b*b) == c*c) ||  ((a*a + c*c) == b*b) || ((b*b + c*c) == a*a) ){
			cout << "yes" << endl;
			return 0;
		}
	}
	cout << "no" << endl;
}

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

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