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 <algorithm>
#include <cstdlib>
#include <iostream>
#include <string>

using namespace std;

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

  int edges[3];
  for (int i = 0; i < num_problems; ++i) {
    cin >> edges[0] >> edges[1] >> edges[2];
    sort(edges, edges + 3);
    cout <<
        (edges[0] * edges[0] + edges[1] * edges[1] == edges[2] * edges[2] ?
         "YES" : "NO") <<
        endl;
  }

  return 0;
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define X real()
#define Y imag()
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using comd = complex<double>;
using pii = pair<int,int> ;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

double CalcDist(comd p1, comd p2){
  return sqrt(pow(p1.X - p2.X,2.0) + pow(p1.Y -p2.Y,2.0));
}

template <typename T>
void out(deque < T > d)
{
  for(size_t i = 0; i < d.size(); i++)
  {
    debug(d[i]);
  }
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

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

C++: #include <iostream>
using namespace std;
int ans[1000];
int main() {
 int n,i,a,b,c;
 cin >> n;
 for (i=0;i<n;i++) {
	 cin >> a >> b >> c;
	 if (a*a==b*b+c*c || b*b==a*a+c*c || c*c==a*a+b*b) ans[i]=1;
 }
 for (i=0;i<n;i++) if (ans[i]==0) cout << "NO" << endl; else cout << "YES" << endl;
 return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
   int t;
   cin>>t;
   for(int i=0;i<t;i++)
   {
       int a,b,c;
       int flag=0;
       cin>>a>>b>>c;
       int max1=max(a,b);
       int max2=max(max1,c);
       if(max2==a)
       {
           if(b*b+c*c==max2*max2)
           {
               cout<<"YES"<<endl;
                flag=1;

           }
       }
       if(max2==b)
       {
           if(a*a+c*c==max2*max2)
           {
               cout<<"YES"<<endl;
             flag=1;
           }
       }
       if(max2==c)
       {
           if(a*a+b*b==max2*max2)
           {
               cout<<"YES"<<endl;
                flag=1;

           }
       }
       if(flag==0)
        cout<<"NO"<<endl;
   }
   return 0;
}

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

int main() {
	int N;
	cin >> N;
	vector<int> temp(3);
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < 3; j++) {
			cin >> temp[j];
			temp[j] = pow(temp[j], 2);
		}
		sort(temp.begin(), temp.end());
		if (temp[0] + temp[1] == temp[2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
		return 0;
}

C++: #include <stdio.h>
#include <stdbool.h> 

void judge(int x, int y, int z, bool flag)
{    
    if (x * x + y * y == z * z){
        flag = true;
    }  
}


int main(void)
{
    int repeat, a, b, c;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        bool flag = false;
        judge(a, b, c, flag); 
        judge(b, c, a, flag);
        judge(c, a, b, flag);
        if (flag == true){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    return 0;        
}

C++: #include <iostream> 
#include <fstream> 
#include <stdlib.h> 
#include <stdio.h>
using namespace std;

// data typically into global variables here

int main () { 
  // string fname = "input";
  int input [3] = {0, 0, 0};
  int N, i, j, max, maxj, c;
  cin >> N;
  for(; i<N; i++){
    max = maxj = 0;
    for (j=0; j < 3; j++){
      cin >> input[j];
      if (input[j] > max){
	max = input[j];
	maxj = j;
      }
    }
    //check pythagorus
    c = 0;
    for (j=0; j<3; j++){
      if (j != maxj){
	c += input[j]*input[j];
      }
    }
    if (max*max == c){
      cout << "YES" << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
  // printf("top 3: %d %d %d\n", top[0], top[1], top[2]);
  return 0; 
}

C++: 
#include "cstdio"


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

	scanf("%d",&n);

	for(;n<0;n--){
		scanf("%d%d%d",&a,&b,&c);
		if(a > b && a > c){
			if( a^2 == b^2 + c^2){
				printf("YES");
			}else {
				printf("NO");
			}}

		if(b > a && b > c){
			if( b^2 == a^2 + c^2){
				printf("YES");
			}else {
				printf("NO");
			}}
			if(c > a && c > b){
				if( c^2 == a^2 + b^2){
					printf("YES");
				}else {
					printf("NO");
				}}}}


	return 0;
}

C++: #include <iostream>

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

C++: #include<iostream>
#include<math.h>
int main(){
	using namespace std;
	int i,a,b,c;

	cin>>i;
	while(cin>>a>>b>>c){
		if(a*a==b*b+c*c){
			cout<<"YES"<<endl;
		}
		else if(c*c==b*b+a*a){
			cout<<"YES"<<endl;
		}
		else if(b*b==a*a+c*c){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	}
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
#include<math.h>
using namespace std;
int main()
{
	int n,a,b,c,a1,b2,c2;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a>>b>>c;
		a1=pow(a,2);
		b2=pow(b,2);
		c2=pow(c,2);
		if(a1+b2==c2)
			cout<<"YES"<<endl;
		if(a1+c2==b2)
			cout<<"YES"<<endl;
		if(b2+c2==a1)
			cout<<"YES"<<endl;
		if(a1+b2!=c2&&a1+c2!=b2&&b2+c2!=a1)
			cout<<"NO"<<endl;
	}
				
	return 0;
}

C++: #include<stdio.h>

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

C++: #include<iostream>
using namespace std;
int main(){
	int N = 0, a, b, c, d = 0;
	cin >> N;
	for (int i = 0; i < N; i++){
		cin >> a >> b >> c;
		if (a < b){
			d = a;
			a = b;
			b = d;
			d = 0;
		}
		if (a < c){
				d = a;
				a = c;
				c = d;
				d = 0;
		}
		if (a*a == b*b + c*c){
			cout << "Yes" << endl;
		}
		else{
			cout << "No" << endl;
		}
	}
	return 0;
}