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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace P0003_Is_it_a_Right_Triangle
{
    class Program
    {
        static void Main(string[] args)
        {

            List<string> lines = new List<string>();

            int cntLine = int.Parse(Console.ReadLine());

            for(int i = 1; i <= cntLine; i++)
            {
                lines.Add(Console.ReadLine());
            }          

            foreach (string line in lines)
            {
                List<string> sidesStr = line.Split(' ').ToList<string>();
                List<int> sides = new List<int>();

                foreach (string sideStr in sidesStr)
                {
                    sides.Add(int.Parse(sideStr));
                }

                sides.Sort();

                if (Math.Pow(sides[2], 2) == Math.Pow(sides[0], 2) + Math.Pow(sides[1], 2))
                {
                    Console.WriteLine("YES");
                }
                else
                {
                    Console.WriteLine("NO");
                }

            }


        }
    }
}

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

int main(){
  using namespace std;
  int num;
  int line[1000][3];

  cin>>num;
  for(int i=0;i<num;i++){
    cin>>line[i][0]>>line[i][1]>>line[i][2];
    sort(line[i],line[i]+3);
  }
  for(int i=0;i<num;i++){
    if(((line[i][0]*line[i][0])+(line[i][1]*line[i][1]))==(line[i][0]*line[i][0]))cout<<"YES"<<endl;
    else
      cout<<"NO"<<endl;
  }
  return 0;
}

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

using namespace std;

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

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

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

C++: #include<stdio.h>
#include<string.h>
#define N 3

int main()
{
    int i, j, a, b, c;
    int A[N][N];

    scanf("%d",&a);
    for(i=0;i<a;i++){
        for(j=0;j<a;j++){
            scanf("%d", &b);
            if(j!=0 && b<A[i][j-1]){
                c = A[i][j-1];
                A[i][j-1] = b;
                A[i][j] = c;
            }else{
                A[i][j] = b;
            }   
        }   
            
    }   
    for(i=0;i<a;i++){
        if(A[i][0]*A[i][0]+A[i][1]*A[i][1]==A[i][2]*A[i][2]){
            printf("YES\n");
        }else{
            printf("NO\n");
        }   
    }   
    return 0;
}

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

C++: 
#include<stdio.h>
#include<math.h>
int main()
{
	int n,tmp;
	double a, b, c;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d %d %d", &a, &b, &c);
		if (a > b)
		{
			tmp = a;
			a = b;
			b = tmp;
			if (b > c)
			{
				tmp = c;
				c = b;
				b = tmp;
				if (a > b)
				{
					tmp = a;
					a = b;
					b = tmp;
				}
			}
			else if (a > c)
			{
				tmp = c;
				c = a;
				a = tmp;
			}
		}
		else if (a > c)
		{
			tmp = c;
			c = a;
			a = tmp;
			if (a > b)
			{
				tmp = a;
				a = b;
				b = tmp;
			}
		}
		pow(c, 2.0);
		if (c== a*a + b*b)
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define fo(x,a,b) for(register int x=a;x<=b;x++)
#define dfo(x,a,b) for(register int x=a;x>b;x--)
using namespace std;
int n,ans;
long double l1,l2,l3;
int main ()
{
	//freopen("")

	scanf("%d",&n);
	fo(i,1,n)
	{
		scanf("%Lf%Lf%Lf",&l1,&l2,&l3);		
		l1*=l1;
		l2*=l2;
		l3*=l3;
		if (l1+l2==l3||l2+l3==l1||l1+l3==l2) printf("YES\n");
		else printf("NO\n");
	}
//	printf("%d",ans);
	return 0;
}

C++: #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(a*a+b*b==c*c) cout << "YES\n";
                else if(b*b+c*c==a*a) cout << "YES\n";
                else if(c*c+a*a==b*b) cout << "YES\n";
                else cout << "NO\n";
        }   
        return 0;
}

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

using namespace std;

int main(){
  int n, a[3];
  cin >> n;
  for(int i = 0; i < n; i++){
    for(int j = 0; j < 3; j++)
      cin >> a[j];
    sort(a, a + 3);
    cout << (a[2] * a[2] == a[0] * a[0] + a[1] * a[1] ? "YES\n" : "NO\n");
  }
}

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

bool judge_triangle(int j_edge[])
{
    std::sort(j_edge, j_edge + 3); 
    return j_edge[2] * j_edge[2] == j_edge[0] * j_edge[0] + j_edge[1] * j_edge[1];
}

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

    for (int i = 0; i < num; i++) {

        int edge[3];
        std::cin >> edge[0] >> edge[1] >> edge[2];

        if (judge_triangle(edge)) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }   
    return 0;
}

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

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

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[1000]={0},y[1000]={0},z[1000]={0},hantei[1000]={0};
	int j=0,e =0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<=0 || 1000<x[j] || y[j]<=0 || 1000<y[j] || z[j]<=0 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
		}
	   
	switch(hantei[i])
	    {
		   case 0:
			  printf("No\n");
			  break;
		   case 1:
			  printf("Yes\n");
		      break;
	   }
	}

	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;
		if(c > b) swap(b, c);
		if(b > a) swap(a, b);
		if(a * a == b * b + c * c){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}