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++: using namespace std;
int main(){
  int N,a,b,c;
  cin>>N;
  for(int 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>

bool right_triangle(int a,int b,int c)
{
    if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) {
        return true;
    }else{
        return false;
    }   
}

int main()
{
    int x,y,z,N;
    std::cin >> N;
    for (int i = 0; i < N; i++) {
        std::cin >> x >> y >> z;
        if (right_triangle(x,y,z)) {
            std::cout << "Yes" << std::endl;
        }else if (right_triangle(x,y,z) == 0 ) { 
            std::cout << "No" << std::endl;
        }
    }
    return 0;
}
                                                            1,1          ??????

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

int main()
{
    int set;
    int num[3];
    int a,b,c;
    
    if(set < 1000)
        cin >> set;
        
    for(int i = 0; i < set; i++){
        for(int j =0; j < 3; j++){
            cin >> num[j];
        }
        sort(num, num+3);
        if(num[0] * num[0] + num[1] * num[1] == num[2] * num[2]){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

int main(){
	int abc[3], N;
	cin >> N;
	for(int i = 0; i < N; i++){
		cin >> abc[0] >> abc[1] >> abc[2];
		while(!(((abc[0] >= 1)&&(abc[0] <= 1000))&&
				((abc[1] >= 1)&&(abc[1] <= 1000))&&
				((abc[2] >= 1)&&(abc[2] <= 1000)))){
			cout << "wrong value\n";
			cin >> abc[0] >> abc[1] >> abc[2];
		}
		sort(abc, abc+3);
		if((pow(abc[0], 2) + pow(abc[1], 2)) == pow(abc[2], 2)){
			cout << "YES\n";
		}else{
			cout << "NO\n";
		}
	}
    return 0;
}

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

int main(){
	int n, a, b, c, ma, sum, rst;
	
	cin >> n;
	
	for(int i=0;i<n;i++){
		cin >> a >> b >> c;
		a*=a; b*=b; c*=c;
		sum=a+b+c;
		ma=max(a,max(b,c));
		rst=sum-ma;
		if(rst==ma) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	
	return 0;
}

C++: #include <stdio.h>

int main() {
    const char YES[] = "YES\n";
    const char NO[] = "NO\n";

    int times = 0;
    scanf("%d", &times);
    for (int i = 0; i < times; ++i) {
        int inputSide[3];
        scanf("%d %d %d", &inputSide[0], &inputSide[1], &inputSide[2]);
        {
            bool finished = false;
            while (!finished) {
                finished = true;

                for (int j = 0; j < 3 - 1; ++j) {
                        if (inputSide[j] < inputSide[j + 1]) {
                        int temp = inputSide[j + 1];
                        inputSide[j + 1] = inputSide[j];
                        inputSide[j] = temp;
                        finished = false;
                    }
                }
            }
        }

        printf(((((inputSide[2] * inputSide[2]) + (inputSide[1] * inputSide[1])) == (inputSide[0] * inputSide[0])) ? YES : NO));
    }

    return 0;
}

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

using namespace std;

int main()
{
int T;
scanf("%d",&T);
for(int t=0;t<T;t++){
int edge[3];
printf("%d %d %d",edge,edge+1,edge+2);
sort(edge,edge+3,greater<int>());
if(edge[0]*edge[0]==edge[1]*edge[1]+edge[2]*edge[2]){
printf("%s\n","YES");
}else{
printf("%s\n","NO");
}
}

return 0;
}

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

using namespace std;

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

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
bool right(int a,int b,int c) {
 if(((a * a) + (b * b)) == (c * c)) {
  return true;
 } else {
  return false;
 }
}

int main() {
 int i = 0,j;
 int n;
 int side[3];
 bool cnt = false;
 vector<string> judge;
 
 cin >> n;
 
 while(i < n) {
  cin >> side[0] >> side[1] >> side[2];
 
  for(j = 0;j < 3;++j) {
   if((side[j] < MIN) || (side[j] > MAX)) {
    cnt = true;
   }
  }
 
  if(cnt == true) continue; 
 
  sort(side, side + 3);
 
  if(right(side[0],side[1],side[2]) == true) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }

  ++i;
 }
 
 for(i = 0;i < judge.size();++i) {
  cout << judge.at(i) << endl;
 }
 
 return 0;
}

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

int isRightTriangle(int a, int b, int c)
{
	int s[3] = {a, b, c};
	std::sort(s, s+3);
	return (s[0] > 0) && (s[2] * s[2] == s[0] * s[0] + s[1] * s[1]);
}

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

	return 0;
}

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

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

void erabu(double* a, double* b,double* c) {
	if (*a > *b) {
		swap(*a, *b);
	}
	if (*b > *c) {
		swap(*b, *c);
	}
	if (*a > *b) {
		swap(*a, *b);
	}
}
int main() 
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		double a, b, c;
		cin >> a >> b >> c;
		erabu(&a, &b, &c);
		if (pow(c, 2) == pow(a, 2) + pow(b, 2)) {
			cout << "Yes" << endl;
		}
		else cout << "No" << endl;
	}

	return 0;
}

C++: class Tenmou{
public class HelloWorld {
    public static void main (String[] args) {

	int n;
	int a,b,c;
	int a[3];
	string str[];
	
	n = Integer.parseInt(br.readLine());
	str[]=new str[n];
	for(int i=0;i<n;i++){

	a = Integer.parseInt(br.readLine());
	b = Integer.parseInt(br.readLine());
	c = Integer.parseInt(br.readLine());

	a[0]=max(a,b,c);
	if(a[0]==a){
		a[1]=b;
		a[2]=c;
	}elseif(a[0]==b){
		a[1]=a;
		a[2]=c;
	}elseif(a[0]==c){
		a[1]=b;
		a[2]=a;
	}
	if(a[0]^2==a[1]^2+a[2]^2){
		str[i]="YES";
	}else{
		str[i]="NO";
	}
	}

	for(int i=0;i<n;i++){
				System.out.println(str[i]);
	}
    }
}
}

C++: #include <iostream>


bool isTriangle(int a, int b, int c) {
  int a2 = a*a, b2 = b*b, c2=c*c;
  int sum = a2 + b2 + c2;
  if ((sum - 2 * std::max(std::max(a2, b2), c2)) == 0)
    return true;
  else
    return false;
}


int main () {
  int a, b, c;
  int n;
  std::cin >> n;
  for (int i = 0; i < n; i ++) {
    std::cin >> a >> b >> c;
    if (isTriangle(a, b, c))
      std::cout << "YES" << std::endl;
    else
      std::cout << "NO" << std::endl;
  }
}