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 <stdio.h>
#include <stdbool.h> 

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


int main(void)
{
    int repeat, a, b, c;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        bool flag = judge (a, b, c); 
        if (flag == true){    
            printf("YES\n");
        } else {	
            printf("NO\n");
        }
    }
    return 0;        
}

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

C++: #include<stdio.h>
#define MAX_N 1000

int main() {

	int i = 0;
	int N = 0;
	int a[MAX_N], b[MAX_N], c[MAX_N];

	scanf("%d", &N);

	for(i = 0; i < N; i++) {
		scanf("%d %d %d", &a[i], &b[i], &c[i]);

		if(a[i] * a[i] + b[i] * b[i] == c[i] * c[i]) {
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
	}

	return 0;
}

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>


using namespace std;

string tri(int a, int b, int c){
	if(a + b >= c && a - b <= c)return "YES";
	return "NO";
}

int main(void) {
	int len, a, b, c;
	cin >> len;
	for(int i = 0; i < len; i++){
		cin >> a >> b >> c;
		cout << tri(a, b, c) << endl;
	}
}

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

using namespace std;

int main() {
    int n;

    cin >> n;

    while (n--) {
        int a[3];

        cin >> a[0] >> a[1] >> a[2];
        sort(a, a + 3);

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

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

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

C++: #include <iostream>

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

int main(){
	
	int n;
	std::cin >> n; // number of dataset
	// input
	for(int i = 0; i < n; ++i){
		int a, b, c;
		std::cin >> a >> b >> c;
		
		if(isRightTriangle(a, b, c)){
			std::cout << "YES" << std::endl;
		}
		else{
			std::cout << "NO" << std::endl;
		}
	}
	return 0;
}

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

int main(){
	int num;
	int a[3];
	int max;
	int max_no;
	int sum;
	cin>>num;
	for(int i=0;i<num;i++){
	cin>> a[0]>> a[1]>> a[2];
	max=a[0];
	max_no=0;
	sum=0;
	for(int j=0;j<2;j++){
	if(max<a[j+1]){
	max=a[j+1];
	max_no=j+1;
	}
	}
	for(int j=0;j<3;j++){
		if(j!=max_no){
		sum+=a[j]*a[j];
		}
	}
	if(sum==max*max){
		cout<< "YES"<<endl;
	}else{
		cout<< "NO"<<endl;
	}
	}
	return 0;
}

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

using namespace std;

int comp(const void *c1, const void *c2){
        int tmp1 = *(int *)c1;
        int tmp2 = *(int *)c2;
        if(tmp1 > tmp2){
                return -1; 
        }else if(tmp1 == tmp2){
                return 0;
        }else{
                return 1;
        }   
}
int main(){
        int n,i,j;
        int l[3];
        string out;
        cin >> n;
        for(i = 0 ; i < n ; i++){
                for(j = 0 ; j < 3 ; j++){
                        cin >> l[j];
                }   
                qsort(l, 3, sizeof(int), comp);
                if(l[0]*l[0] == l[1]*l[1]+l[2]*l[2]){
                        out += "YES\n";
                }else{
                        out += "NO\n";
                }   
        }   
        cout << out << flush;
}

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

void sjx(double a, double b, double c)
{
	if (2*a < b + c+a && 2*b < a + c+b && 2*c < a + b+c)
		cout << "yes" << endl;
	else
		cout << "no" << endl;
}
int main()
{
	int a;
	double b,c,d,x;
	cin >> a;
	for (x = 1; x <= a; x++)
	{
		cin >> b >> c >> d;
		sjx(b, c, d);
	}
    return 0;
}

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

int ary[3][1010];
int main(){
	priority_queue<int> que;
	int N;
	cin>>N;
	int a;
	for(int i=1;i<=N;i++){
		for(int j=0;j<=2;j++){
			cin>>a;
			que.push(a);
		}
		for(int j=0;j<=2;j++){
			ary[i][j]=que.top();
			que.pop();
		}
	}
	for(int i=1;i<=N;i++){
		if(ary[i][0]*ary[i][0]==ary[i][1]*ary[i][1]+ary[i][2]*ary[i][2]){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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

int N;
int a[3]; 
int b,c,d;

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

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

int main () {
    int n, a,b,c,i;
    for(i=0;i<n;i++){
        cin >> a >> b >> c;
        if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "Yes" << endl;
        else cout << " No" << endl;
    }
}

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

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

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

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

int main()
{
	cin >> N ;

	while( N > 0 )
	{
		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) ) )
		{
			cout << "YES" << endl ;
		}
		else
		{
			cout << "NO" << endl ;
		}

		N -- ;
	}

	_getch() ;
	return 0 ;
}