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 <vector>
#include <algorithm>
//#include <fstream>

using namespace std;

int main()
{
//	cut here before submit 
//	freopen ("testcase.tri", "r", stdin );
	int n;
	cin >> n;

	int i,j;
	vector <int> side (3, 0 );

	for (i = 0; i < n; ++i ){
		for (j = 0; j < 3; ++j ){
			cin >> side[j];
		} // end for

		sort (side.begin(), side.end() );

		if (side[2]*side[2] == side[1]*side[1] + side[0]*side[0] ){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if
	} // end for
		
	return 0;
}

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

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

        int tri[10][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])) printf("YES\n");
                if(tri[cnt][1]==(tri[cnt][2]+tri[cnt][0])) printf("YES\n");
                if(tri[cnt][2]==(tri[cnt][0]+tri[cnt][1])) printf("YES\n");
                else printf("NO\n");
        }

        return 0;
}

C++: main(a,b,c){
for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);
puts((a+b-c&&a+c-b&&b+c-a)?"NO:"YES"))
a*=a,b*=b,c*=c;
exit(0);
}

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

int main()
{
	int n;
	int side[3];

	cin >> n;

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

	return (0);
}

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(){
  using namespace std;
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    int a,b,c;
    cin >> a >> b >> c;
    int l,m,s;
    s = min(a,min(b,c));
    m = max(max(min(a,b),min(b,c)),min(c,a));
    l = max(a,max(b,c));
    if(l*l == m*m + s*s){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
}

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

bool IsRightTriangle(const int a, const int b, const int c)
{
	if(a <= b){
		if(b <= c){
			if(c*c == a*a + b*b){
				return true;
			}else{
				return false;
			}
		}else{
			if(b*b == c*c + a*a){
				return true;
			}else{
				return false;
			}
		}
	}else{
		if(a <= c){
			if(c*c == a*a + b*b){
				return true;
			}else{
				return false;
			}
		}else{
			if(a*a == b*b + c*c){
				return true;
			}else{
				return false;
			}
		}
	}
}

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

C++: #include <iostream>
#include <string>
#include <cstring>
#include <fstream>
#include <random>
#include <cmath>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <map>
#include <deque>
#include <map>
#include <set>
#include <unordered_set>
#include <queue>
#include <stack>
#include <list>
#include <unordered_map>
#include <bitset>
#include <sstream>
#include <new>
#include <typeinfo>
#include <iterator>


typedef long long ll;
typedef unsigned long long ull;
constexpr ll mop = 1000000007;
constexpr ll mop2 = 998244353;

using namespace std;

int main() {
	ll n;
	cin >> n;
	for (ll i = 0; i < n; i++) {
		vector<ll> v(3);
		for (ll j = 0; j < 3; j++) {
			cin >> v[j];
		}
		sort(v.begin(), v.end(), greater<ll>());
		if (v[0] * v[0] == v[1] * v[1] + v[2] * v[2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}

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

C++: #include<stdio.h>
#include<math.h>
int main(void)
{
	int k[100][3],ct;
	int mem=0;
	scanf("%d",&ct);
	for(int f1=0;f1<ct;f1++){
		scanf("%d %d %d",&k[f1][0],&k[f1][1],&k[f1][2]);
	}
	for(int f=0;f<ct;f++){
		for(int f1=0;f1<3;f1++){
			for(int f2=0;f2<3;f2++){
				if(k[f][f1]>k[f][f2]){
					mem=k[f][f1];
					k[f][f1]=k[f][f2];
					k[f][f2]=mem;
				}
			}
		}
	}
	for(int f1=0;f1<ct;f1++){
		if(pow((double)k[f1][0],2)==pow((double)k[f1][1],2)+pow((double)k[f1][2],2)){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

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

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

C++: #include<stdio.h>
main(){
  int a,b,c,temp;
  scanf("%d %d %d",&a,&b,&c);
  if(a<b){
    temp=a;
    a=b;
    b=temp;
  }
  if(a<c){
    temp=a;
    a=c;
    c=temp;
  }
  if(a*a==b*b+c*c){
    puts("YES");
  }
  else{
    puts("NO");
  }
  return 0;
}

C++: #include <string>
#include <iostream>
#include <vector>
#include <sstream>
using namespace std;
void swap(int idx1, int idx2, int *node)
{
	int f = node[idx1];
	node[idx1] = node[idx2];
	node[idx2] = f;
}
//nlogn
void quickSort(int left, int right, int *node)
{
	int pl = left;
	int pr = right;
	int pivot_f = node[(pl + pr) / 2];
	do
	{
		while (node[pl] < pivot_f)
		{
			pl++;
		}
		while (node[pr]> pivot_f)
		{
			pr--;
		}
		if (pl <= pr)
		{
			swap(pl++, pr--, node);
		}
	} while (pl <= pr);
	if (left < pr) quickSort(left, pr, node);
	if (pl <= right) quickSort(pl, right, node);
}

bool compare(int a, int b)
{
	if (a == b)
	{
		return true;
	}
	else {
		return false;
	}
}
int main()
{
	string max;
	getline(cin, max);
	string ans[1000];
	int count = 0;
	for (int num = 0; num < stoi(max); num++)
	{
		string str;
		string item;
		vector<string> list;
		getline(cin, str);
		int edge[3];
		stringstream ss(str);
		while (getline(ss, item, ' ') && !item.empty()) {
			list.push_back(item);
		}
		
		edge[0] = stoi(list[0].c_str());
		edge[1] = stoi(list[1].c_str());
		edge[2] = stoi(list[2].c_str());
		quickSort(0, 2, edge);

		int edge1 = edge[2] * edge[2];
		int edge2 = edge[0] * edge[0] + edge[1] * edge[1];
		if (compare(edge1, edge2))
		{
			ans[count] = "YES";
			count++;
		}
		else {
			ans[count] = "NO";
			count++;
		}
	}
	for (int i = 0; i < count;i++)
	{
		cout << ans[i] << endl;
	}
	return 0;
}

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

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


    }
    return 0;
}