Go: package main

import (
	"fmt"
)

func main() {
	lines := [3]int{}
	var round int
	fmt.Scan(&round)
	for r := 0; r < round; r++ {
		fmt.Scan(&lines[0], &lines[1], &lines[2])

		if lines[0] > lines[1] && lines[0] > lines[2] {

		} else if lines[2] > lines[1] {
			tmp := lines[0]
			lines[0] = lines[2]
			lines[2] = tmp
		} else {
			tmp := lines[0]
			lines[0] = lines[1]
			lines[1] = tmp
		}

		if lines[1]*lines[1]+lines[2]*lines[2] == lines[0]*lines[0] {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

bool isRightTri(int a,int b,int c);
void swap(int& a,int &b);

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

bool isRightTri(int a,int b,int c){
  if(a>b) swap(a,b);
  if(b>c) swap(b,c);
  if(a*a+b*b-c*c==0) return true;
  return false;
}

void swap(int& a,int &b){
  int tmp;
  tmp=b;
  b=a;
  a=tmp;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int n,i,j,a[3],x,y,z;
	cin>>n;
	for(i=0;i<n;i++){
		for(j=0;j<3;j++){
	cin>>a[j];
	x=a[2]*a[2];
	y=a[1]*a[1];
	z=a[0]*a[0];
		}
		sort(a,a+3);
		if(x==(y+z)){
		cout<<"YES"<<endl;
		}
		else{
		cout<<"NO"<<endl;
		}
	}
return 0;
}

C++: #include <iostream>

int main()
{
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    int N, a, b, c;
    std::cin >> N;
    for (int i = 0; i < N; ++i) {
        std::cin >> a >> b >> c;
        if (a * a + b * b == c * c)
            std::cout << "YES" << std::endl;
        else
            std::cout << "NO" << std::endl;
    }
}

C++:  #include <cstdio>

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

	return 0;
}

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

int main()
{
	int l;
	cin >> l;
	for (int i = 0; i < l; i++) {
		int a, b, c;
		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<iostream>
using namespace std;
int main()
{
    long long int a,b,c,f,t;
    cin>>t;
    while(t--)
    {
        f=0;
        cin>>a>>b>>c;
        if(a>b && a>c)
        {
            if((b*b)+(c*c)==(a*a))
                f=1;
        }
        else if(b>a && b>c)
        {
            if((a*a)+(c*c)==(b*b))
                f=1;
        }
        else if(c>b && c>a)
        {
            if((b*b)+(a*a)==(c*c))
                f=1;
        }
        if(f==1)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>

using namespace std;

typedef long long int lld;

const lld mod = 1e9+7;
const lld INF = 1e9;
//const lld MAXN = 1e9;

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

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

		int x,y,z;

		x = max(max(a,b),max(b,c));
		z = min(min(a,b),min(b,c));
		y = a+b+c-x-z;

		if (x*x == y*y + z*z)
		{
			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];
	int j=0,e=0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<1 || 1000<x[j] || y[j]<1 || 1000<y[j] || z[j]<1 || 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
				hantei[i]=0;
		}
		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
				hantei[i]=0;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
			else
				hantei[i]=0;
		}
	}
	for(i=0;i<j;i++)
	  {   
	   switch(hantei[i])
	    {
		   case 0:
			  printf("NO\n");
			  break;
		   case 1:
			  printf("YES\n");
		      break;
		   default:
			   break;
	   }
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
  int ct = 0;
  vector<int> v(3);

  scanf("%d", &ct);
  for(int i = 0; i < ct; i++) {
    scanf("%d %d %d", &v[0], &v[1], &v[2]);
    sort(v.begin(), v.end());                    
    if(v[2] * v[2] == v[0] * v[0] + v[1] * v[1]) printf("YES\n");
    else printf("NO\n");
    v.clear();
  }
  return 0;
}

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

C++: #include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main(){
    int n,a[3],b[3],l,k;
    cin>>n;
    for(l=0;l<n;l++){
        if(l>1000){
            break;
        }
        for(k=0;k<3;k++){
            cin>>a[k];
            if(a[k]>1000||a[k]<=0){
                break;
            }
            b[k]=a[k]^2;
        }
        sort(b,b+3);
        if(b[2]==b[0]+b[1]){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
    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;
		
		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>
#include <algorithm>

using namespace std;

int main()
{
	int n[200][3];
	int len=0,m;
	cin >> m;
	while (cin >> n[len][0] >> n[len][1] >> n[len][2]) {
		n[len][0] *= n[len][0];
		n[len][1] *= n[len][1];
		n[len][2] *= n[len][2];
		len++;
	}
	for (int i = 0; i < len; i++) {
		if (n[i][0] == (n[i][1] + n[i][2]))
			cout << "YES" << endl;
		else if (n[i][1] == (n[i][2] + n[i][0]))
			cout << "YES" << endl;
		else if (n[i][2] == (n[i][0] + n[i][1]))
			cout << "YES" << endl;
		else 
			cout << "NO" << endl;
	}
	return 0;
}

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

int main(){
	int N;
	int a=0,b=0,c=0;

	cin >> N ;

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

		cin >> a >> b >> c;

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

}

C++: #include <cstdio>
int main()
{

        int i;
        scanf("%d",&i);

        int tri[8][3];

        int cnt,k;

        for(cnt=0;cnt<i;cnt++)
        {
                scanf("%d %d %d",&tri[cnt][0],&tri[cnt][1],&tri[cnt][2]);        
                for(k=0;k<3;k++)
                {
                        tri[cnt][k]=tri[cnt][k]*tri[cnt][k];
                }
                if(tri[cnt][0]==(tri[cnt][1]+tri[cnt][2])||tri[cnt][1]==(tri[cnt][2]+tri[cnt][0])||tri[cnt][2]==(tri[cnt][0]+tri[cnt][1])) printf("YES\n");
                else printf("NO\n");
        }

        return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

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

	for (int i = 0; i < N; i++) {
		vector<int> v(3);
		cin >> v.at(0) >> v.at(1) >> v.at(2);

		sort(v.begin(), v.end());
		int& a = v.at(0),
			& b = v.at(1),
			& c = v.at(2);
		a *= a;
		b *= b;
		c *= c;
		if (a + b == c) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}