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>
#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<bits/stdc++.h>
using namespace std;
int main(){
  int a, b, c, n;
  cin >> n;
  for(int i = 0;i < n;i++){
    cin >> a >> b >> c;
    if(b + c > a && a * a == b * b + c * c) cout << "YES\n";
    else if(a + c > b && b * b == a * a + c * c) cout << "YES\n";
    else if(a + b > c && c * c == a * a + b * b) cout << "YES\n";
    else cout << "NO\n"; 
  }

  return 0;
}

C++: #include"iostream"

using namespace std;

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

C++: #include<iostream>
#include<string>
using namespace std;
typedef unsigned int uint;
string heihou(uint a,uint b,uint c){
	if (a*a
== b*b + c*c || b*b == a*a + c*c || c*c==a*a+b*b){

		return "YES";
	}
	else{
		return "NO";
	}
}
int main()
{
	uint dataset[999][2];
	int i = 0;
	int l;
	cin >> l;
	while (i<l){
		cin >> dataset[i][0] >> dataset[i][1] >> dataset[i][2]; 
		i++;
	}
	for (int j = 0; j < i; j++){
		cout << heihou(dataset[j][0], dataset[j][1], dataset[j][2])<< endl;
	}
	return 0;
}

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

C++: #include <stdio.h>
int main()
{
  int a,b,c,sum,i,n;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d",&a,&b,&c);
    a=a*a;
    b=b*b;
    c=c*c;
    sum=a+b+c;
    if(sum/2==a||sum/2==b||sum/2==c)printf("Yes\n");
    else printf("No\n");
  }
  return 0;
}

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

class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*a+b*b) ans=1;
else ans=0;
};

void print(){
if(ans==0)
cout <<"NO"<< endl;
if(ans==1)
cout <<"YES"<< endl;
}

protected:
int a,b,c,ans;
};

int main(){
int num,a,b,c;
	Triangle *tri /* = Triangle[1000]*/;
	cin >> num;
	tri = new Triangle[num]/*(a,b,c)*/;
	for(int n=0;n<num;n++){
	cin >> a;
	cin >> b;
	cin >> c;
	tri[n].push(a,b,c);
	}
for(int n=0;n<num;n++){
tri[n].checkRight();
tri[n].print();
}
return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  while(scanf("%d %d %d",&a,&b,&c)!=EOF){
    if(a*a+b*b==c*c) printf("YES\n");
    else if(a*a+c*c==b*b) printf("YES\n");
    else if(b*b+c*c==a*a) printf("YES\n");
    else printf("NO\n");
  }
  return 0;
}

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

int main(void)
{
	int T;
	cin >> T;

	for(int i = 1, a, b, c; i <= T; 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;
	}

	return 0;
}

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

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

 if ((array[1]*array[1]+array[2]*array[2]) == array[0]*array[0]){
 cout << "YES"<<endl;
 }
 else {
 cout << "NO" << endl;
 }

 }
 
return 0;
 }

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>


using namespace std;

bool isTri(int a, int b, int c){
  if(max(a, b) < c){
    if(pow(c, 2.0) == pow(a, 2.0) + pow(b, 2.0)){
      return true;
    }
  }else{
    if(pow(max(a, b), 2.0) == pow(min(a, b), 2.0) + pow(c, 2.0)){
      return true;
    }
  }
  return false;
}


int main(){
  int a, b, c;
  int num;
  cin >> num;
  
  while(cin >> a >> b >> c){
    if(isTri(a, b, c)){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
    
}

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());
    printf("%s\n", v[2]*v[2] == v[0] * v[0] + v[1] * v[1] ? "YES" : "NO");
    v.clear();
  }
  return 0;
}

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

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

	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 - b*b == a*a){
			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 = a;
				a = tmp;
				if (a > b)
				{
					tmp = a;
					a = b;
					b = tmp;
				}
			}
			else if (a > c)
			{
				tmp = c;
				c = a;
				a = c;
			}
		}
		else if (a > c)
		{
			tmp = c;
			c = a;
			a = c;
		}
		pow(c, 2.0);
		if (c= a*a + b*b)
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	return 0;
}

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

int main(){
	int num;//number of data sets
	int temp;

	cin >> num;

	int a[num],b[num],c[num];
	double x,y,z;

	for (int i = 0; i < num; i++)
	{
		cin >> a[i] >> b[i] >> c[i];
	}

	//直角三角形の判別
	for (int i = 0; i < num; i++)
	{
		if (a[i] > b[i])
		{
			temp = a[i]; 
			a[i] = b[i]; 
			b[i] = temp;
		}
		if (b[i] > c[i])
		{
			temp = b[i];
			b[i] = c[i];
			c[i] = temp;
		}

		x = c[i]*c[i];
		y = a[i]*a[i];
		z = b[i]*b[i];

		if(x == (y + z)){
			cout << "YES" << endl;
		} else{
			cout << "NO" << endl;
		}

	}

	return 0;
}

C++: #include<iostream>

using namespace std;

//??\?????????
void swap(int *a, int *b){
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main(){

	int num,i,j;
	
	cin >> num;
	
	int a[num],b[num],c[num];
	
	for(i=0;i<num;i++){
		cin >> a[i] >> b[i] >> c[i];
	}
	
	int t[3];
	for(i=0;i<num;i++){
		t[0] = a[i];
		t[1] = b[i];
		t[2] = c[i];
		
		int max,str;
		str = 1;
		while(str<=3){
			max = t[str-1];
			for(j=str;j<3;j++){
				if(max<t[j]){
					max = t[j];
					swap(t[str-1],t[j]);
				}
			}
			str++;
		}
		if(t[0]*t[0]==t[1]*t[1]+t[2]*t[2])
			cout << "YES\n";
		else cout << "NO\n";
	}
	
	return 0;
}