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 <cmath>

#define upper 1000
#define lower 1
#define eN 1000

using namespace std;


void swap(int& e1, int& e2, int& e3){
	if (e1 > e2){
		int tmp = e1;
		e1 = e2;
		e2 = tmp;
	}
	if (e2 > e3){
		int tmp = e2;
		e2 = e3;
		e3 = tmp;
	}
	if (e1 > e3){
		int tmp = e1;
		e1 = e3;
		e3 = tmp;
	}
}

bool check(int e1, int e2, int e3){
	if (((e1*e1)+(e2*e2)) == (e3*e3)){
		return true;
	}
	else{
		false;
	}
}

int main(void){
	int N = 0;
	cin >> N;
	for (int i=0; i<N; ++i){
		int e1, e2, e3;
		cin >> e1 >> e2 >> e3;
		swap(e1,e2,e3);
		if (check(e1, e2, e3)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdio>
#include <string>
#include <sstream>

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define repn(i, n) for(int i = 1; i <= (int)n; ++i)
#define pb push_back
#define lb lower_bound
#define mp make_pair
#define ite iterator
#define max2(x, y) ((x) > (y)) ? (x) : (y)
#define max3(x,y,z) max2((x), max2((y),(z)))
#define max4(v,w,x,y) max2(max2((v),(w)), max2((x),(y)))
#define min2(x, y) ((x) > (y)) ? (y) : (x)
#define min3(x,y,z) min2((x), min2((y),(z)))
#define min4(v,w,x,y) min2(min2((v),(w)), min2((x),(y)))
#define ul unsigned long
#define ull unsigned long long
#define INF 1000000007
#define MOD 1000000007
#define fs first
#define sd second

template<typename T>
bool elem(set<T> st, T val){
	return (st.find(val) != st.end());
}

template<typename T>
void printv(vector<T> vt){
    rep(i, vt.size() - 1)
        cout << vt[i] << " ";
    cout << vt[vt.size() - 1] << endl;
}

typedef vector<int> vint;
typedef vector<ul> vul;
typedef vector<ull> vull;
typedef pair<int, int> pii;


int main(void){
    int t;
    cin >> t;
    while(t-- > 0){
        vint a(3);
        rep(i, 3) cin >> a[i];
        sort(a.begin(), a.end());
        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>
#include<cstring>
#include<algorithm>
#include<string>
#include<vector>
#include<map>
#include<cstdio>
#include<cmath>
#define pb push_back
#define mp make_pair
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
	int n;
	cin>>n;
	rep(i,n){
		vector<int>in(3);
		rep(j,3)cin>>in[j];
		sort(all(in));
		if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
}

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

int main() {
	int a, b, c, n, i;
	vector<int> A;
	vector<vector<int>> B;
	cin >> n;
		for (i = 0; i < n; i++) {
			cin >> a >> b >> c;
			A.push_back(a);
			A.push_back(b);
			A.push_back(c);
			sort(A.begin(), A.end());
			B.push_back(A);
			A.clear();
		}
		for (i = 0; i < n; i++) {
			if (B[i][2] * B[i][2] == B[i][0] * B[i][0] + B[i][1] * B[i][1]) cout << "YES" << endl;
			else cout << "NO" << endl;
	}
	return 0;
}

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

int main()
{
	int x, a, b, c;
	cin >> x;
	for (int i=1; i<=x; i++)
	{
		cin >> a >> b >> c;
		if (pow(a, 2) + pow(b, 2) == pow(c, 2))
			cout << "YES" << endl;
		else if (pow(c, 2) + pow(a, 2) == pow(b, 2))
			cout << "YES" << endl;
		else if (pow(c, 2) + pow(b, 2) == pow(a, 2))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
		x = x^2;
		y = y^2;
		z = z^2;
			if((x+y)==z||(x+z)==y||(y+z)==x){
				printf("YES\n");
			}
			else {
				printf("NO\n");
			}
		}
	return 0;
}

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

int main(){
	int a[3], b;
	cin >> b;
	while(true){
		cin >> a[0] >> a[1] >> a[2];
		if(cin.eof()){
			break;
		}
		sort(a,a + 3);
		b = pow(a[1],2) + pow(a[0],2);
		if (pow(a[2],2) == b){
			cout << "Yes";
		}
		else{
			cout << "No";
		}
		cout << endl;
	}
}

C++: #include<iostream>
#include<math.h>
using namespace std;
int main()
{
	float cant,a,b,hip;
	cin>>cant;
	for(int i=0;i<cant;i++)
	{
		cin>>a>>b>>hip;
		if(sqrt((a*a)+(b*b))==hip)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include <iostream>
//#include <iomanip>
//#include <vector>
//#include <string>
#include <algorithm>
#include <functional>

using namespace std;

int main(){

	int n, a, b, c;

	cin >> n;

	while (n--){
		cin >> a >> b >> c;

		if (a*a + b*b == c*c || a*a + c*c == b*b || b*b + c*c == a*a){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}

	}



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

C++: #include<iostream>
#include<algorithm>
#include<functional>
#include<cmath>  // log10(int n);
#include<math.h>

//#include"PC.h"

using namespace std;


bool pitagoras_number(int data[3]){
sort(data,data+3,greater<int>());
int sum;
for(int i=1;i<3;i++)sum+=pow(data[i],2.0);

return pow(data[0],2.0)==sum;


}


int main(){

int n;
cin>>n;
	for(int i=0;i<n;i++){
	int data[3];
	for(int i=0;i<3;i++)cin>>data[i];
	
	if(pitagoras_number(data))cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	
	}

}

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

int triangle(int a,int b,int c){
    a = a*a;
    b = b*b;
    c = c*c;

    if(a == (b+c))      return 0;
    else if(b == (a+c)) return 0;
    else if(c == (a+b)) return 0;
    else                return 1;
}

int main(){
   int n;
   int a,b,c;
   int i = 0;

   scanf("%d",&n);

  while(i < n){
   scanf("%d %d %d",&a,&b,&c);
  
   if(triangle(a,b,c) == 0){ 
     cout << "YES\n";
   }else{
     cout << "NO\n"; 
 }
}
    return 0;
}