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++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][1000];
int y = 0;
int temp = 0;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];

}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<4;looper2++)
{
    if((panjang[looper][y+1])<(panjang[looper][y+2]))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;
            if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
    }
    }

}

for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << "YES" << endl;
    else cout << "NO" << endl;
}


}

}

C++: #include<stdio.h>

void right_triangle(int x, int y, int z)
{
    int xx = x * x;
    int yy = y * y;
    int zz = z * z;
    if (xx == yy + zz) {
        printf("YES\n");
    } else if (yy == xx + zz) {
        printf("YES\n");
    } else if (zz == xx + yy) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}    

int main(void)
{
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int r[3];
        scanf("%d %d %d", &r[0], &r[1], &r[2]);
        right_triangle(r[0], r[1], r[2]);
    }
    return 0;
}

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

#define Triangle(s1,s2,s3) if(s1*s1+s2*s2==s3*s3)
using namespace std;

int main()
{
	int n;
	int h[3];
	vector<int> side;
	int i;
	
	cin >> n;
	
	for(i=0;i<n;i++)
	{
		side.clear();
		
		for(int j=0;j<3;j++)
		{
			cin >> h[j];
			side.push_back(h[j]);
		}
		
		sort(side.begin(),side.end());
		
		Triangle(side[0],side[1],side[2])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}

C++: #include <stdio.h>

bool check(int n1, int n2 , int n3){
	int a,b;
	a = n1*n1;
	b = n2*n2 + n3*n3;
	return (a==b)? true : false ;
}

int main(){
	int N,n1,n2,n3;

	scanf("%d", &N);
	for(int i=0 ; i<N ; i++){
		scanf("%d %d %d", &n1 , &n2 , &n3);
		if( check(n1,n2,n3) || check(n2,n1,n3) || check(n3,n2,n1) ){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}

	return 0;
}

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

C++: #include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>

using namespace std;

int main (void)
{
	int n,a[3];

	cin >> n;

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

		sort (a,a + 3);

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

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

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

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

C++: #include <cstdio>

int main(){
	int N;
	scanf("%d", &N);
	for(int i = 0; i < N; i++){
		int a, b, c;
		scanf("%d %d %d\n", &a, &b, &c);
		puts(((a *a + b*b == c*c) || (a*a + c*c == b*b) || (b*b + c*c == a*a))?"YES":"NO");
	}
	return 0;
}

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

using namespace std;

double check_right_triangle(int a,int b,int c){
    return (pow(a,2) + pow(b,2) - pow(c,2))/(2 * a * b);
}

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

C++: #include<iostream>
#include<algorithm>
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(max({a,b,c}) == a && b * b + c * c == a * a){
      cout << "YES" << endl;
    }else if(max({a,b,c}) == b && a * a + c * c == b * b){
      cout << "YES" << endl;
    }else if(max({a,b,c}) == c && a * a + b * b == c * c){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
  return 0;
}

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

int main() {

    int N;
    cin >> N;

    int a, b, c;

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

        vector<int> vec;

        vec.push_back(a);
        vec.push_back(b);
        vec.push_back(c);

        sort(vec.begin(), vec.end(), greater<int>());

        if(pow(vec[0], 2) == pow(vec[1], 2) + pow(vec[2], 2)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

using namespace std;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);

	int N;
	cin >> N;

	vector<int> n(3);
	while (N--)
	{
		cin >> n[0] >> n[1] >> n[2];

		sort(n.begin(), n.end());
		if (pow(n[0], 2) + pow(n[1], 2) == pow(n[2], 2))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

C++: #include"iostream"
using namespace std;
int main()
{
	int n;
	cin>>n;
	while(n--)
	{
		int a,b,c;
		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 cou<<"NO"<<endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <stdbool.h>

int main(void)
{
    int n, a[2];
    bool flag = false;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%d %d %d", &a[0], &a[1], &a[2]);
        for (int j = 0; j < 3; ++j) {
            if (a[j] * a[j] == (a[j + 1 % 3] * a[j + 1 % 3] + a[j + 2 % 3] * a[j + 2 % 3])) {
                flag = true;
            }
        }
        if (flag) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

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