Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i := 0; i < n; i++ {
		data := nextInts(3)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	}
	return "NO"
}
func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

C++: #include <iostream>
#include <math.h>
using namespace std;
int main(){
	int a,b[3]={0};
	cin>>a;
	for (int A=0;A<a;A++){
		cin>>b[0]>>b[1]>>b[2];
		sort(b,b+3);
		b[0]=pow(b[0],2);
		b[1]=pow(b[1],2);
		b[2]=pow(b[2],2);
		if (b[2]==b[0]+b[1])cout<<"Yes"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <math.h>
#include <vector>
#include <queue>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
using namespace std;
#define rep(I,N) for(int I = 0; I < (int)(N); I++)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;

int main(void){
	int N;
	rep(k, N){
		int a, b, c;
		cin >> a >> b >> c;
		a = pow(a, 2);
		b = pow(b, 2);
		c = pow(c, 2);
		bool flag = false;
		if(c == sqrt(a + b))flag = true;
		if(b == sqrt(a + c))flag = true;
		if(a == sqrt(b + c))flag = true;
		if(flag)cout << "YES"<<endl;
		else FIN("NO");

	}

	return 0;	
}

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

C++: #include <cstdio>
int main()
{

        int i;
        scanf("%d",&i);

        int tri[50][3];

        int cnt,k;

        for(cnt=0;cnt<i;cnt++)
        {
                scanf("%d %d %d",&tri[cnt][0],&tri[cnt][1],&tri[cnt][2]);        
                for(k=0;k<3;k++)
                {
                        tri[cnt][k]=tri[cnt][k]*tri[cnt][k];
                }
                if(tri[cnt][0]==(tri[cnt][1]+tri[cnt][2])||tri[cnt][1]==(tri[cnt][2]+tri[cnt][0])||tri[cnt][2]==(tri[cnt][0]+tri[cnt][1])) printf("YES\n");
                else printf("NO\n");
        }

        return 0;
}

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

C++: #include<iostream>

using namespace std;

int main(void)
{
	int a,b,c;
	cin>>a;
	while(cin>>a>>b>>c){
		int x,y,z; x=b; y=c; z=a;
		if(z<b) z=b; x=a; y=c;
		if(z<c) z=c; x=a; y=b;
		if(x*x+y*y==z*z){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
}

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

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

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

int main(int argc, const char * argv[])
{
    int n, a, b, c;
    scanf("%d", &n);
    
    for (int i = 0; i < n; i++) {
        scanf("%d %d %d", &a, &b, &c);
        if (a*a + b*b == c*c) {
            printf("YES\n");
        }
        else if (b*b + c*c == a*a) {
            printf("YES\n");
        }
        else if (c*c + a*a == b*b) {
            printf("YES\n");
        }
        else
            printf("NO\n");
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
  
int main() {
int a[3];
int n; cin >> n;
for(int i=0; i<n; i++) {
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;
}

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

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

C++: #include<stdio.h>

int getLongestIndex(int length[3]);

 int main(void){
   int num;
   int length[3];

   fscanf(stdin,"%d",&num);
   for(int i = 0;i < num;i++){
     fscanf(stdin,"%d %d %d",&length[0],&length[1],&length[2]);
     if(length[0] != length[1] && length[1] != length[2] && length[0] != length[2]){
       int longest = length[getLongestIndex(length)];
       longest *= longest;

       int other = 0;
       for(int n = 0;n < 3;n++){
         if(n == getLongestIndex(length)){
           continue;
         }
         other += length[n] * length[n];
       }

       if(longest == other){
         printf("YES\n");
       }
       else{
         printf("NO\n");
       }
     }
     else{
       printf("NO\n");
     }
   }

   return 0;
 }

 int getLongestIndex(int length[3]){
   int longerIndex = -1;
   int longer = -1;
   for(int i = 0;i < 3;i++){
     if(longer < length[i]){
       longer = length[i];
       longerIndex = i;
     }
   }
   return longerIndex;
 }

C++: #include <iostream>
//#include <cstdio>
//#include <cmath>
using namespace std;
 
//0003
int main(){
	int n;
	int a, b, c, a2, b2, c2;
	cin >> n;
	while(n--){
		cin >> a >> b >> c;
		a2 = a*a;
		b2 = b*b;
		c2 = c*c;

		if(a==b && b==c){
			cout << "NO" << endl;
			break;
		}
		if(a2==b2+c2 || b2==a2+c2 || c2==a2+b2){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
bool bigger (int a, int b) { return (a > b); }
void isRTriangleAndPrint (int a, int b, int c) {
	std::vector<int> list(3, 0);
	list[0]=a;list[1]=b;list[2]=c;
	sort(list.begin(), list.end(), bigger);
	if (list[0]*list[0] == list[1]*list[1]+list[2]*list[2])
		puts("YES");
	else
		puts("NO");
}

int main (int argc, char *argv[]) {
	int dataNumber;
	fscanf(stdin, "%d\n", &dataNumber);
	
	int side[3];
	for(int i = 0; i < dataNumber; ++i) {
		fscanf(stdin, "%d %d %d\n", &side[0], &side[1], &side[2]);
		isRTriangleAndPrint(side[0], side[1], side[2]);
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int N;
	cin >> N;
	while(N--){
		int i[3],c;
		int max;
		cin >> i[0] >> i[1] >> i[2];
		sort(i,i+2);
		if(i[0]*i[0]+i[1]*i[1]==i[2]*i[2])
			cout<<"YES\n";
		else
			cout<<"NO\n";

	}
}