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 <vector>
#include <algorithm>
#include <math.h>
using namespace std;

int main(){
	int N;
	int l1, l2, l3;
	int answer=0;
	vector<int> lines;
	cin >> N;
	for(int i=0;i<N;i++){
		cin >> l1 >> l2 >> l3;
		lines.push_back(l1);
		lines.push_back(l2);
		lines.push_back(l3);
		while(next_permutation(lines.begin(), lines.end())){
			if(pow(lines[0],2) == pow(lines[1],2) + pow(lines[2],2)) answer = 1;
		}
		if (answer == 1) cout << "YES" << endl;
		else cout << "NO" << endl;
		lines.clear();
		answer = 0;
	}
	return 0;
}

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

using namespace std;

int main()
{
    int n;
    int a;
    int b;
    int c;
    n = n+1;
    while (n--)
    {
        scanf("%d%d%d", &a, &b, &c);
        if ((a*a+b*b == c*c) || (a*a+c*c == b*b) || (b*b+c*c == a*a) )
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
    return 0;
}

C++: #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

int main() {
	int kaisu;
	int x,y,z;
	int kekka;
	
	cin >> kaisu;
	
	for(int i = 1; i <= kaisu; i++){
	cin >> x >> y >> z;
	int array[3];
	array[0] = x;
	array[1] = y;
	array[2] = z;
		if( array[0] < array[1] ){
		swap(array[0],array[1]);
		}
		if( array[0] < array[2] ){
		swap(array[0],array[2]);
		}
		if( array[1] < array[2] ){
		swap(array[1],array[2]);
		}
	kekka = ((array[1]*array[1]+array[2]*array[2])-array[0]*array[0])/2*array[1]*array[2];
	if (kekka == 0){
	cout << "YES";
	}
	else {
	cout << "NO";
	}
	}

	
    return 0;
}

C++: #include <iostream>

int main() {
	int N;
	std::cin >> N;

	for( int i=0; i<N; ++i ) {
		int a=0, b=0, c=0;
		std::cin >> a >> b >> c;
		std::cout << (( a*a + b*b == c*c )?"YES":(( b*b + c*c == a*a )?"YES":(( c*c + a*a == b*b )?"YES":"NO"))) << std::endl; 
	}
}

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

int main(){
  int a,b,c;
  while(scanf("%d %d %d",&a,&b,&c)){
  a*=a;
  b*=b;
  c*=c;
  if(a==(b+c)||b==(a+c)||c==(a+b))cout << "YES" <<endl;
  else cout << "NO" <<endl;
  }
  return 0;

C++: #include <iostream>
  
inline bool isRightTriangle(const u_int a, const u_int b, const u_int c){
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}
  
int main(){
    u_int n;
    std::cin >> n;
     
    for (u_int i = 0; i < n; ++i){
        u_int a, b, c;
        std::cin >> a >> b >> c;
        std::cout << (isRightTriangle(a, b, c) ? "YES" : "NO") << std::endl;
    }
  
    return 0;
}

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

int l[3][3];

void swap(int a, int b, int c){
	int buf = l[c][a];
	l[c][a] = l[c][b];
	l[c][b] = buf;
}

//bubble
void sort(int c){
	for(int i = 0; i < 2; i++){
		for(int j = i; j < 2; j++){
			if(l[c][j] > l[c][j+1]) swap(j,j+1,c);	
		}
	}
}

int main(){
int buf;

cin >> buf;

for(int i = 0; i < buf; i++){	
	cin >> l[i][0] >> l[i][1] >> l[i][2];
	sort(i);
}

for(int j = 0; j < buf; j++){
	if(l[j][2]*l[j][2] == l[j][0]*l[j][0] +l[j][1]*l[j][1]){
		cout << "YES";
	}else{
		cout << "NO";
	}

	if(j != buf-1) cout << endl;
}

return 0;
}

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

C++: #include <cstdio>

int i,a,b,c;
int main()
{
	scanf("%d",&i);
		while(i!=0)
		{
			scanf("%d %d %d",&a,&b,&c);
			
			if(a*a+b*b==c*c||b*b+c*c==a*a||c*c+a*a==b*b)
			{
				printf("YES\n");
			}
			else printf("NO\n");
			i--;
		}

	return 0;
}

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

int main(){
	int N;
	int l1, l2, l3;
	int answer=0;
  vector<int> lines;
	vector<string> result;
	cin >> N;
	for(int i=0;i<N;i++){
		cin >> l1 >> l2 >> l3;
		lines.push_back(l1);
		lines.push_back(l2);
		lines.push_back(l3);
		while(next_permutation(lines.begin(), lines.end())){
			if(pow(lines[0],2) == pow(lines[1],2) + pow(lines[2],2)) answer = 1;
		}
		if (answer == 1) result.push_back("YES");
		else result.push_back("NO");
    lines.clear();
    answer = 0;
	}

  for(int i=0;i<result.size();i++){
    cout << result[i] << endl;
  }
	return 0;
}

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;
		int max = a > b ? a : b;
		max = max > c ? max : c;
		cout << ((max*max == a * a + b * b + c * c - max * max) ? "YES" : "NO") << endl;
	}
}

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

int main(void)
{
    int n, a[3];
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        bool flag = false;
        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 tests, a, b, c;

int main(void)
{
  scanf("%d",&tests);
  while(tests--)
  {
    scanf("%d %d %d",&a,&b,&c);
    if (a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b)
      puts("YES");
    else
      puts("NO");
  }
  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>=b+c && b>=a+c && c>=a+b)cout<<"YES"<<endl;else cout<<"NO"<<endl;
}
return 0;
}

C++: #include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int a,b,c,n,i;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b>>c;
        if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==b*b+a*a)
            cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
        
    }
        
    return 0;
}

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

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

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