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>
int main(){
	int a,b,c,n,i;
std::cin>>n;
for(i=0;i=n;i++){
	std::cin>>a>>b>>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;

class Triangle{
private:
	int a, b, c;
public:
	void Set();
	bool Jugde();
};

void Triangle::Set(){
	cin >> a >> b >> c;
}

bool Triangle::Jugde(){
	int buf;
	if(a < b){
		buf = a;
		a = b;
		b = buf;
	}
	if(a < c){
		buf = a;
		a = c;
		c = buf;
	}
	if(a*a == b*b + c*c) return true;
	else return false;
}

int main(){

	int n;
	bool jugde;
	Triangle* dataset;

	cin >> n;

	dataset = new Triangle[n];

	for(int i = 0; i < n; i++)
		dataset[i].Set();

	for(int i = 0; i < n; i++){
		jugde = dataset[i].Jugde();
		if(jugde == true)
			cout << "YES" << "\n";
		else
			cout << "NO" << "\n";
	}

	return 0;
}

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

int main()
{
	int a,b,c;
	int x=0;
	int n;
	cin >> n;
	for(int i=0 ;i<n ;i++){
		cin >> a >> b >> c;
		if(a<b){
			x=a;
			a=b;
			b=x;
		}
		else if(a<c){
			x=a;
			a=c;
			c=x;
		}

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

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

int main() {
    int N;
    cin >> N;
    int a, b, c;
    while (N--) {
        cin >> a >> b >> c;
        int l=max(a,max(b,c));
        int x, y;
        if (a==l) {
            x=b;
            y=c;
        } else if (b==l) {
            x=a;
            y=c;
        } else if (c==l) {
            x=a;
            y=b;
        }
        if (l==sqrt(pow(x,2)+pow(y,2))) {
            printf("Yes\n");
        } else {
            printf("No\n");
        }
    }
    return 0;
}

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

C++: #include<iostream>

#define REP(i, a) for(int i=0;i<(int)a;++i)
using namespace std;

void solver() {
    int N;
    cin >> N;
    REP(i, N) {
        int a, b, c;
        cin >> a >> b >> c;
        bool isTri = a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b;
        cout<<(isTri?"YES":"NO")<<endl;
    }
}

int main() {
    solver();
    return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
 
int main() {
	int len[3];
	int N;
	cin >> N;
	for (int j = 0; j < N; j++) {
		cin >> len[0] >> len[1] >> len[2];
		for (int i = 0; i < 3; i++) {
			len[i] = len[i] * len[i];
		}
		if (len[0] + len[1] == len[2] ||
			len[1] + len[2] == len[0] ||
			len[2] + len[0] == len[1])
		{
			cout << "YES\n";
		}
		else {
			cout << "NO\n";
		}
	}

    return 0;
}

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

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

C++: #include <deque>
#include <iostream>
#include <algorithm>
 
int main()
{
using namespace std;
deque<int> edge;
int iedge[3];
int j;
int a,b,c;
 
cin >> j;
 
for(int l=0;l<j;l++){
for(int i=0;i<3;i++){
cin >> iedge[i];
edge.push_back(iedge[i]);
}
 
sort(edge.begin(),edge.end());
a = edge[0];
b = edge[1];
c = edge[2];
if(c*c == (a*a+b*b))cout << "YES\n";
else cout << "NO\n";

edge.clear();
}
 
return 0;
}

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

int main(){
  int a,b,c;
  while(scanf("%d %d %d",&a,&b,&c)!=EOF){
  a*=a;
  b*=b;
  c*=c;
  if(a==(b+c)||b==(a+c)||c==(a+b))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 (judgefunc(firstn, secondn, thirdn) = true) {
        printf("YES\n");
        } else {
        printf("NO\n");
        }
    }
    return 0;
}



int triJudgefunc(int x, int y, int z)
{
    double 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
        }
    }
    double result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2;
    return result;
}

C++: #include<iostream>
using namespace std;
int main(){
    int a,b,c,d,s,t,n,i;
    cin >> n;
    for(i=0;i<n;i++){
    cin >> a >> b >> c;
    if(a<b){
        d=b;
        b=a;
        a=d;
    }if(b<c){
        d=c;
        c=b;
        b=d;
    }if(a<b){
        d=b;
        b=a;
        a=d;
    }
    s=a*a;
    t=(b*b)+(c*c);
    if(s==t){
        cout << "Yes"<< endl;
        }else {
        cout << "No" << endl;
        }
    }

 return 0;
}

C++: main(a,b,c){
for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&b+c-a)?"NO:"YES"))a*=a,b*=b,c*=c;
}

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

    return 0;
}

C++: #include <iostream>

int main() {
	using namespace std;

	int sampleNum;
	cin >> sampleNum;

	for (; sampleNum > 0; --sampleNum) {
		int a, b, c;
		cin >> a >> b >> c;
		bool right = false;
		right = a * a == b * b + c * c || b * b == c * c + a * a || c * c == a * a + b * b;
		cout << (right ? "YES" : "NO") << endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
	int a,b,c,d;
	cin>>d;
	for(int i=0;i<d;i++){
		cin>>a>>b>>c;
		if(a*a+b*b==c*c or b*b+c*c==a*a or c*c+a*a==b*b){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO";
		}
	}
	return 0;
}

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

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

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