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>
#include<math.h>
#include<string>
using namespace std;

int main()
{
  int n,a[1000],b[1000],c[1000],m;
  string ans[1000];

  cin>>n;
  for(int i=0; i<n; i++)
    cin>>a[i]>>b[i]>>c[i];
    
  for(int i=0; i<n; i++){
    m = max(a[i],b[i]);
    m = max(m,c[i]);
    if(m == a[i]){
      if(a[i] * a[i] == b[i] * b[i] + c[i] * c[i])
	ans[i] = "YES";
      else
	ans[i] = "NO";
      continue;
    }
    if(m == b[i]){
      if(b[i] * b[i] == a[i] * a[i] + c[i] * c[i])
	ans[i] = "YES";
      else
	ans[i] = "NO";
      continue;
    }
    if(m == c[i]){
      if(c[i] * c[i] == a[i] * a[i] + b[i] * b[i])
	ans[i] = "YES";
      else
	ans[i] = "NO";
    }
  }

  for(int i=0; i<n; i++)
    cout<<ans[i]<<endl;

  return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[3];
  rep(i,n){
    rep(j,3){
      cin >> a[j];
    }
    sort(a,a+3);
    rep(i,3) cout << a[i] << " ";
    if(pow(a[2],2) == pow(a[0],2)+pow(a[1],2)) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}

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

int main ()
{
	int a,b,c;
	int n;
	scanf ("%d",&n);
	for (int i=0;i<n;i++)
	{
		scanf ("%d%d%d",&a,&b,&c);
		if (a==0||b==0||c==0)
		printf ("NO\n"); 
		else
		{
			if (((pow(a,2)+pow(b,2))==pow(c,2))||((pow(a,2)+pow(c,2))==pow(b,2))||((pow(c,2)+pow(b,2))==pow(a,2)))
		    printf ("YES\n");
		    else
		    printf ("NO\n"); 
		}
	}
	return 0;
}

C++: 3
4 3 5
4 3 6
8 8 8

C++: #include <iostream>

using namespace std;

void triangle_check(int max, int x, int y);

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

    cin >> n;

    while (n-- > 0) {
        cin >> a >> b >> c;

        if (a > b) {
            if (a > c) {
                triangle_check(a, b, c);
            }
            else {
                triangle_check(c, a, b);
            }
        }
        else {
            if (b > c) {
                triangle_check(b, a, c);
            }
            else {
                triangle_check(c, a, b);
            }
        }
    }

    return 0;
}

void triangle_check(int max, int x, int y) {
    if ( max*max == x*x + y*y )
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
}

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

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

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

C++: #include <bits/stdc++.h>
#define int long long
using namespace std;
const int INF = 1e9 + 7, MOD = 1e9 + 7;
const long long LINF = 1e18;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
signed main() {
	int n;
	cin >> n;
	int a[3];
	for (int i = 0; i < n; i++) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3, greater<int>());
		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>
using namespace std;

int main() {

    int N;
    cin >> N;

    int a[3];

    for(int i = 0; i < N; i++) {
        cin >> a[0] >> a[1] >> a[2];

        int maxIndex = 0;
        for(int j = 0; j < 2; j++) {
            if(a[j + 1] > a[j]) {
                maxIndex = j + 1;
            }
        }

        int q = 0;
        int w = 0;
        for(int k = 0; k < 3; k++) {
            if(k == maxIndex) {
                q = a[k] * a[k];
            } else {
                w += a[k] * a[k];
            }
        }

        if(q == w) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

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

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl


int main(){
	li a[3];
	li n;
	cin>>n;
	
	rin{
		cin>>a[0]>>a[1]>>a[2];
		sort(a,a+3);
		if(a[0]*a[0]+a[1]*a[1]!=a[2]*a[2])puts("NO");
		else puts("YES");
	}
	
	return 0;
}

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

using namespace std;

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

C++: #include<iostream>
#include<math.h>

using namespace std;

int main()
{
	int n;
	int a,b,c; //a^2+b^2=c^2

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

}

C++: #include<cstdio>
#include<algorithm>
#include<cmath>

using namespace std;

int main(){
        int  d ,i;
        int a[1000] = {0};
        int b[1000] = {0};
        int c[1000] = {0};
        bool ans[1000];
        scanf("%d", &d);
        for(i = 0; i < d; i++){
                scanf("%d%d%d", &a[i], &b[i], &c[i]);
                ans[i] = false; 
                if(a[i] * a[i] + b[i] * b[i] == c[i] * c[i])
                        ans[i] = true;
                if(b[i] * b[i] + c[i] * c[i] == a[i] * a[i])
                        ans[i] = true;
                if(c[i] * c[i] + a[i] * a[i] == b[i] * b[i])
                        ans[i] = true;
                printf("%s\n", ans[i] ? "YES" : "NO");
        }
        return 0;
}

C++: #include <stdio.h>

int hantei(int l1,int l2,int l3);
//??´?§?????§???¢??????????????????????????????????????????

int main(void)
{
	int kaisuu, l1, l2, l3;
	scanf("%d", &kaisuu);
	for(int i = 0; i < kaisuu; i++) {
		scanf("%d %d %d", &l1, &l2, &l3);
		if(hantei(l1, l2, l3) == 1) {
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

int hantei(int l1,int l2,int l3)
{
	int llong, lshort1, lshort2;
	if(l1 <= l2) {
		lshort1 = l1 ^ 2;
		if(l2 <= l3) {
			lshort2 = l2 ^ 2;
			llong = l3 ^ 2;
		}else{
			lshort2 = l3 ^ 2;
			llong = l2 ^ 2;
		}
	}else{
		lshort1 = l2 ^ 2;
		if(l1 <= l3) {
			lshort2 = l1 ^ 2;
			llong = l3 ^ 2;
		}else{
			lshort2 = l3 ^ 2;
			llong = l1 ^ 2;
		}
	}
	if(lshort1+ lshort2 == llong) {
		return 1;
	}else{
		return 0;
	}
}