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>
using namespace std;
int main()
{
	int times;
	cin >> times;
	bool * a = new bool[times];
	for (int i = 0; i<times; ++i)
	{
		int q, w, e;
		cin >> q >> w >> e;
		if (q + w>e&&q + e>w&&e + w>q)
		{
			if (q*q + w * w == e * e || w * w + e * e == q * q || q * q + e * e == w * w)
				a[i] = true;
			else a[i] = false;
		}
		else
		{
			a[i] = false;
		}
	}
	for (int i = 0; i<times; ++i)
	{
		if (a[i])    cout << "YES" << endl;
		else    cout << "NO" << endl;
	}

}

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

class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*a+b*b) ans=1;
else ans=0;
};

void print(){
if(ans==0)
cout << "NO" << endl;
if(ans==1)
cout << "YES" << endl;
}

protected:
int a,b,c,ans=5;
};

int main(){
int num,a,b,c;
	Triangle *tri /* = Triangle[1000]*/;
	cin >> num;
	tri = new Triangle[num]/*(a,b,c)*/;
	for(int n=0;n<num;n++){
	cin >> a;
	cin >> b;
	cin >> c;
	tri[n].push(a,b,c);
	}
for(int n=0;n<num;n++){
tri[n].checkRight();
tri[n].print();
}
return 0;
}

C++: #include<stdio.h>

void handan(int a, int b, int c)
{
	if (a*a == b*b + c*c)
		printf("YES\n");
	else
		printf("NO\n");
}
int main()
{
	int n;
	int a, b, c;

	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d %d %d", &a, &b, &c);
		if (a > b&&a > c)
			handan(a, b, c);
		else if (b > a&&b > c)
			handan(b, c, a);
		else
			handan(c, a, b);
	}
	return 0;
}

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

void judgement(unsigned int a, unsigned int b, unsigned int c) {
	if ((a ^ 2) == (b ^ 2) + (c ^ 2) || (b ^ 2) == (a ^ 2) + (c ^ 2) || (c ^ 2) == (a ^ 2) + (b ^ 2)) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

int main() {
	int n;//dataset

	cin >> n;

	vector<unsigned int> vector_a;
	vector<unsigned int> vector_b;
	vector<unsigned int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}

C++: #include<stdio.h>

int main(void)
{
	int x,n;
	int a[1000]={0},b[1000]={0},c[1000]={0},jud[1000]={0};

	scanf("%d",&x);
	
	for(n=0;n<x;n++)
	{
		scanf("%d %d %d",&a[n],&b[n],&c[n]);

		a[n]=a[n]*a[n];
		b[n]=b[n]*b[n];
		c[n]=c[n]*c[n];

		if(a[n]==(b[n]+c[n])||b[n]==(a[n]+c[n])||c[n]==(a[n]+b[n]))
		{
			jud[n]=1;
		}
		else
		{
			jud[n]=0;
		}
	}

	for(n=0;n<x;n++)
	{
		if(jud[n]==1)
		{
			printf("YES\n");
		}
		else if(jud[n]==0)
		{
			printf("NO\n");
		}
	}

	return 0;
}

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

int main(){
	int n;
	cin >> n;
	for(int i = 0; i < 3; 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[1] >vec[2]){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}

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

using namespace std;

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

C++: #Include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

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

    vector<vector<int>> triangles;
    
    int n;
    cin >> n;
    
    REP(i, 0, n) {
        vector<int> tmp;
        int a, b, c;
        cin >> a >> b >> c;
        tmp.push_back(a);
        tmp.push_back(b);
        tmp.push_back(c);
        
        sort(tmp.begin(), tmp.end());
        triangles.push_back(tmp);
    }

    for(auto sides : triangles) {
        if (sides[2] * sides[2] == sides[0]*sides[0]+sides[1]*sides[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

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


int main(){
    int x;
    vector<int> nums;
    nums.resize(3,0);
    cin >> x;
    while( 0 <= --x ){
        int a,b,c;
        cin >> nums[0] >> nums[1] >> nums[2];
        sort(nums.begin(), nums.end());
        if( pow(nums[0], 2) + pow(nums[1], 2) == pow(nums[2], 2)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }


    return 0;
}

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

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

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

	cin >> i;
	for (int j = 0; i > j; j++) {
		cin >> a >> b >> c;
		a *= a;
		b *= b;
		c *= c;
		if(a + b == c || b + c == a || c + a == b) cout<<"Yes"<<endl;
		else									   cout<<"No"<<endl;
	}
	return 0;
}

C++: #include<iostream>


int main(void){
  int a,b,c;
  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;
}