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<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;
 /*temp*/

int main(){
    int n, j;
    int a[3];
    cin >> n;
    REP(i, n){
        cin >> a[0] >> a[1] >> a[2];
        sort(a, a+3);
        if(a[0]*a[0] +a[1]*a[1]==a[2]*a[2])
            printf("YES\n");
        else
            printf("NO\n");
    }
}

C++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][3];
int y = 0;
int temp;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];
        if(panjang[x][y]>1000||panjang[x][y]<1||panjang[x][y+1]>1000||panjang[x][y+1]<1||panjang[x][y+2]>1000||panjang[x][y+2]<1)
            return 0;
}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<5;looper2++)
{
    if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
            if((panjang[looper][y+1]<(panjang[looper][y+2])))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;

    }

    }
}
cout << endl;
}
for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << "YES" << endl;
    else cout << "NO" << endl;
}


}

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

bool check_right_tri(int a,int b,int c){

  int max = std::max({a,b,c});

  if(max == a && a*a == b*b + c*c)
    return true;
  else if(max == b && b*b == a*a + c*c)
    return true;
  else if(max ==c && c*c == a*a + b*b)
    return true;
  else return false;
}

int main(){
  const int min = 1;
  const int max = 1000;
  const int data_max = 1000;
  int a,b,c,N;
  std::cin >> N;

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

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

int main() {
  int n, a[3];
  scanf("%d", &n);
  while (n--) {
    scanf("%d %d %d", &a[0], &a[1], &a[2]);
    sort(a, a + 3);
    if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) puts("YES");
    else puts("NO");
  }
}

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

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

bool check(int a, int b , int c){
	return ( a*a == ( b*b + c*c ) )? true : false ;
}

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

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

	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;
	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;
}