Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
	int caso;
	int lado_1, lado_2, lado_3;
	
	vector<int> triangle;
	
	cin >> caso;
	
	for(int index = 0; index < caso; ++index) {
		cin >> lado_1 >> lado_2 >> lado_3;
		triangle.push_back(lado_1);
		triangle.push_back(lado_2);
		triangle.push_back(lado_3);
	
		sort(triangle.begin(), triangle.end());
		
		if( pow(triangle[0], 2) + pow(triangle[1], 2) == pow(triangle[2], 2) )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define FOR(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define MOD (1000000007)
#define INF (1e9)
#define INFL (1e18)
 
typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
template<class T>using arr=vector<vector<T>>;
template<class T>void pr(T x){cout << x << endl;}
template<class T>void prvec(vector<T>& a){rep(i, a.size()-1){cout << a[i] << " ";} cout << a[a.size()-1] << endl;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

void IsRightTriangle(int a, int b, int c){
    a *= a;
    b *= b;
    c *= c;
    if(a == b + c || b == c + a || c == b + a) pr("YES");
    else pr("NO");
}

int main()
{
    int n; cin >> n;
    rep(i, n){
        int a, b, c; cin >> a >> b >> c;
        IsRightTriangle(a, b, c);
    }
    return 0;}

C++: #include<iostream>
#include<math.h>
using namespace std;
int main(){
  int n,j=0;
  int max,min=0,a,b,c;
  cin>>n;
  while(j<n){
      cin>>a>>b>>c;
    if(pow(a,2)==pow(b,2)+pow(c,2)||
       pow(b,2)==pow(a,2)+pow(c,2)||
       pow(c,2)==pow(a,2)+pow(b,2)){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
  return 0;
}

C++: #include<cstdio>
#include<string>
#include<vector>
#include<fstream>
#include<iostream>
#include<stdlib.h>
#include<math.h>
#include<cwctype>
#include<algorithm>
#include<math.h>

using namespace std;

bool check(int x,int y,int z ){
	int m=max(max(y,z),x);
	x=(x==m)? 0 : x*x;
	y=(y==m)? 0 : y*y;

	z=(z==m)? 0 : z*z;
	if((x+y+z)==pow(m,2.0))return true;
	else false;

}
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int x,y,z;
		cin>>x>>y>>z;

		if(check(x,y,z)){
			cout<<"YES"<<endl;
		}
		else cout<<"NO"<<endl;


	}

		return 0;
}

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

int main() {
    int N, a, b, c;
    cin >> N;
    while (N--) {
        cin >> a >> b >> c;
        if (a > b) {
            int t = a; a = b; b = t;
        }
        if (b > c) {
            int t = b; b = c; c = t;
        }
        if (a > b) {
            int t = a; a = b; b = t;
        }

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

C++: #include <cstdio>

int main()
{
	int iCount, ia, ib, ic;
	int iTrueFlag[1000];

	scanf("%d",&iCount);

	for( int i=0;i<iCount;i++ ){
		scanf("%d %d %d",&ia, &ib, &ic);

		if( (ia*ia) + (ib*ib) == (ic*ic) )
			iTrueFlag[i] = 1;
		else
			iTrueFlag[i] = 0;
	}

	for( int i=0;i<iCount;i++ ){
		if( iTrueFlag[i] == 1)
			printf("YES\n");
		else
			printf("NO\n");
	}

	return 0;
}

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

int main() {
	int a, b, c, A, B, C, n;
	cin >> n;
	for(int i = 0; i < n; i++) {
		cin >> a >> b >> c;
		A = a*a; B = b*b; C = c*c;
		if(A == B + C || B == A + C || C == A + B) {
			printf("YES\n");
		}else printf("NO\n");
	}

	return 0;
}

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

int main()
{
  int num,tmp;
  int a,b,c;
  cin >> num; 
  while(num-->0){
    cin >> a >> b >> c;
    if(b>a){
      tmp=a;
      a=b;
      b=tmp;
    }
    if(c>a){
      tmp=a;
      a=c;
      c=tmp;
    }
    if(a*a==b*b+c*c)
      cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}

C++: 
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
	int N,a,b,c,i=0;
	while(cin>>N)
	{
		while(N--)
		{
			cin>>a>>b>>c;
			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 a, b, c, n;
	bool _bool = false;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a >> b >> c;
		_bool = false;
		if (a * a == (b* b + c * c) || b*b == a*a + c*c || c*c == a* a + b* b)
		{
			_bool = true;
		}
		if (_bool)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}


	return 0;
}

C++: #include <array>
#include <algorithm>
#include <cstdio>

using namespace std;

int main() {
    array<int, 3> sides;
    int n;
    scanf("%d", &n);

    for (int i = 0; i < n; ++i)
    {
        scanf("%d %d %d", &sides[0], &sides[1], &sides[2]);
        sort(sides.begin(), sides.end());
        printf(sides[2] * sides[2] == sides[0] * sides[0] + sides[1] * sides[1] ? "YES\n" : "NO\n");
    }

    return 0;
}

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

int main(){
	using namespace std;
	while(1){
		int n;
		long long int a[3] = { 0 };
		cin >> n;
		if(cin.eof() || n == 0) break;
		for(int i = 0;i<n;i++){
			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>
using namespace std;
int main()
{
  int a,b,c,n,t,i;
  cin >> n;
  for(i=0;i<n;i++)
   {
      cin >> a >> b >> c;
      if(a>b)
       {
          t = a;
          a = b;
          b = t;
       }
      if(a>c)
       {
          t = a;
          a = c;
          c = t;
       }
      if(b>c)
       {
          t = b;
          b = c;
          c = t;
       }
     if(a*a + b*b == c*c)
         cout << "YES" << endl;
     else
         cout << "NO"  << endl;
    }
   return 0;
}

C++: #include<stdio.h>


int main(){
	int N = 0 ,i,j,k,cheak = 0,tmp = 0;
	int tri[3] = {0,0,04};
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&tri[0],&tri[1],&tri[2]);
		for(j = 0;j <= 2;j++){
			for(k = j + 1;k <= 2;k++){
				tmp = tri[j];
				tri[j] = tri[k];
				tri[k] = tmp;
			}
		}
		if(tri[0] * tri[0] == tri[1] * tri[1] + tri[2] * tri[2]){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

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

bool check(const int* array);
int main(void) {
    int length[3];
    int n;
    
    cin >> n;
    
    for(int i = 0; i < n; ++i) {
        cin >> length[0] >> length[1] >> length[2];
        sort(length, length + 3);
        if(check(length)) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

bool check(const int* array) {
    if(array[0] * array[0] + array[1] * array[1] == array[2] * array[2]) {
        return true;
    } else {
        return false;
    }
}