Go: package main
import (
        "fmt"
)

func main() {
        var num int
        fmt.Scan(&num)

        for i := 0; i < num; i++ {
                s1 := 0
                s2 := 0
                s3 := 0
                var chk int = 0
                fmt.Scanf("%d %d %d", &s1, &s2, &s3)
                if s1 >= s2 {
                        if s1 > s3 {
                                chk = 1
                        } else {
                                chk = 3
                        }
                } else {
                        if s2 >= s3 {
                                chk = 2
                        } else {
                                chk = 3
                        }
                }

                if (chk == 1 && s1*s1 == s2*s2 + s3*s3) ||
                        (chk == 2 && s2*s2 == s3*s3 + s1*s1) ||
                        (chk == 3 && s3*s3 == s1*s1 + s2*s2) {
                        fmt.Printf("YES\n")
                } else {
                        fmt.Printf("NO\n")
                }
        }
}

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

using namespace std;


int main(void)
{
	int n;
	cin >> n;

	vector<bool> result(n);

	array<int, 3> triangle;
	for(int i = 0; i < n; i++){
		cin >> triangle[0] >> triangle[1] >> triangle[2];

		sort(begin(triangle), end(triangle), less<int>());

		const auto square = bind(pow<int, int>, placeholders::_1, 2);
		result[i] = 
			square(triangle[0]) == square(triangle[1]) + square(triangle[2]);
	}

	for(const bool& b : result){
		cout << (b ? "YES" : "NO") << endl;;
	}

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<algorithm>
#include<numeric>
#include<vector>
#include<iostream>
#include<map>
#include<math.h>

using namespace::std;

int main(void)
{

  int n;
  cin >> n;

  while( n-- )
    {
      vector<double> edge(3);
      
      for(int i = 0; i < 3; i++)
	{
	  cin >> edge[i];
	}

      sort( edge.begin() , edge.end() );

      string ans = "YES";

      if( !( pow( edge[0] , 2 ) + pow( edge[1] , 2 ) == pow( edge[2] , 2 ) ) )
	{
	  ans = "NO";
	}

      cout << ans << endl;

    }

  return 0;

}

C++: #include <stdio.h>
#include <math.h>
int trianglechecker(int x, int y, int z);
int main(void){
    int loop,len1,len2,len3,Len1,Len2,Len3;
    int f=0;
    scanf("%d", &loop);
    for(int i=0;i<loop;i++)
    {
        scanf("%d%d%d", &len1, &len2, &len3);
        f=trianglechecker(len1,len2,len3);
        if(f == 1)
        {
            printf("YES\n");
        }
        if(f == 0)
        {
            printf("NO\n");
        }
    }
    return 0;
}
int trianglechecker(int x, int y, int z)
{
    if(x * x == y * y + z * z){
        return 1;
    }
    if(y * y == x * x + z * z){
        return 1;
    }
    if(z * z == y * y + x * x){
        return 1;
    }
    return 0;
}

C++: #include<iostream>
#include<vector>
#include<math.h>

using namespace std;

int maxnum(int f,int s,int t) {

   if (f >= s && f >= t) {

      return 0;

   }
   else if (s >= f && s >= t) {

      return 1;

   }
   else {

      return 2;

   }

}

bool solve() {

   int n;
   vector<int[3]> set;
   bool f;

   cin >> n;

   for (long i=0;i<n;i++){
   
      for (long j = 0; j < 3; j++) {

         cin >> set[i][j];

      }
   
   }

   for (long i = 0; i < n; i++) {

      f=( pow(set[i][0],2)==(pow(set[i][1],2)+pow(set[i][2],2)) || pow(set[i][1],2)==(pow(set[i][0],2)+pow(set[i][2],2)) || pow(set[i][2], 2) == (pow(set[i][0], 2) + pow(set[i][1], 2)) );
      f?cout << "YES\n" : cout << "NO\n";
   }

   return 0;
}

int main() {

   return solve();

}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <iterator>
#include <cmath>
#include <stack>
#include <functional>
using namespace std;

 
int main()
{
  int n;
  cin >> n;
  vector<int> tri(3);

  while(n > 0, n--) {
    cin >> tri[0] >> tri[1] >> tri[2];
    sort(tri.begin(), tri.end());
    if(pow(tri[0], 2) + pow(tri[1], 2) == pow(tri[2], 2))
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}

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

int main(void) {
	int i,c,n,hen[3];
	double h,a;
	scanf("%d",&n);
	
	for(i = 0; n > i; i++){
		scanf("%d%d%d",&hen[0], &hen[1], &hen[2]);
		for(c = 0; 3 > c; c++){
		if(hen[c]*hen[c] + hen[(c+1)%3] * hen[(c+1)%3] == hen[(c+2)%3]*hen[(c+2)%3]) {printf("YES\n");break;}
		}
		if(3 == c)printf("NO\n");
	}
	return 0;
}

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

using namespace std;

int N;
int Side[3];

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

C++: #include <iostream>
#include <string>
#include <cstring>
#include <cstdlib>
using namespace std;
int stoi(string s)
{
    return atoi(s.c_str());
}
struct triangle
{
    triangle() { leg1 = leg2 = leg3 = 0; }
    bool isHyp()
    {
        if (leg1*leg1 + leg2*leg2 == leg3*leg3 || leg2*leg2 + leg3*leg3 == leg1*leg1 || leg3*leg3 + leg1*leg1 == leg2*leg2)
            return true;
        return false;
    }
    int leg1;
    int leg2;
    int leg3;
};
int main()
{
    int j;
    cin >> j;
    triangle* triData = new triangle[j];
    bool* results = new bool[j];
    string s;
    for (int i = 0; i < j; i++)
    {
        getline(cin, s, ' ');
        triData[i].leg1 = stoi(s);
        s.clear();
        getline(cin, s, ' ');
        triData[i].leg2 = stoi(s);
        s.clear();
        getline(cin, s);
        triData[i].leg3 = stoi(s);
        results[i] = triData[i].isHyp();
    }
    for (int i = 0; i < j; i++)
    {
        cout << (results[i] ? "YES" : "NO") << endl;
    }
    
    
    
    delete [] results;
    delete [] triData;
}

C++: #include<stdio.h>
int main(){
    int n;
    int a[3];
    int mem;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        mem=0;
        for(int j=0;j<3;j++){
            scanf("%d",&a[j]);
            if(mem<=a[j]){
                mem=a[j];
            }
        }
        if(mem*mem==a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-mem*mem){
            printf("YES\n");
        }
        else{
            printf("NO\n");
        }
    }
    return 0;
}

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

int main(){
	int n,a,b,c;

	cin >> n;

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

		int max=a, k=b, l=c;
		if(max < b){
			max = b;
			k=a;
		}
		if(max < c){
			max = c;
			k=b;
			l=a;
		}

		if(max*max == k*k + l*l)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

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

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