Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func square(x int) int {
	return x * x
}

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

using namespace std;

int comp(const void *c1, const void *c2){
        if(c1 > c2){
                return -1; 
        }else if(c1 == c2){
                return 0;
        }else{
                return 1;
        }   
}
int main(){
        int n,i,j;
        int l[3];
        string out;
        cin >> n;
        for(i = 0 ; i < n ; i++){
                for(j = 0 ; j < 3 ; j++){
                        cin >> l[j];
                }   
                qsort(l, 3, sizeof(int), comp);
                if(l[0]*l[0] == l[1]*l[1]+l[2]*l[2]){
                        out += "YES\n";
                }else{
                        out += "NO\n";
                }   
        }   
        cout << out << flush;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <cassert>
using namespace std;

#define GET_ARG(a,b,c,F,...) F
#define REP3(i,s,e) for (i = s; i <= e; i++)
#define REP2(i,n) REP3 (i,0,(int)(n)-1)
#define REP(...) GET_ARG (__VA_ARGS__,REP3,REP2) (__VA_ARGS__)
#define RREP3(i,s,e) for (i = s; i >= e; i--)
#define RREP2(i,n) RREP3 (i,(int)(n)-1,0)
#define RREP(...) GET_ARG (__VA_ARGS__,RREP3,RREP2) (__VA_ARGS__)
#define DEBUG(x) cerr << #x ": " << x << endl

typedef long long ll;

constexpr int INF = 1e8;
constexpr int MOD = 1e9+7;

int main(void) {
    int i, t;
    int a[3];
    cin >> t;
    while (t--) {
        REP (i,3) 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>

using namespace std;

int main(){

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

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 100;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

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*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>

using namespace std;

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

	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> a >> b >> c;
		a *= a;
		b *= b;
		c *= c;

		if (a + b == c) {
			cout << "YES";
		}
		else {
			cout << "NO";
		}

		cout << endl;
	}

	return 0;
}

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

int main(){

  int n;

  cin>>n;

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

}

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


int main(){

  int n;
  cin >> n;

  vector <int> array(3,0);

  while(n>0){

    cin >> array[0] >> array[1] >> array[2];

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

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


  return 0;
}

C++: #include<cstdio>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int i,x,suu,cnt;
	int hen[3];
	cnt=0;
	scanf("%d",&suu);
	while(!(suu==cnt)){
		cnt++;
		for(i=0;i<3;i++){
			scanf("%d",&hen[i]);
		}
		sort(hen,hen+3,greater<int>());
		if(hen[2]*hen[2]+hen[1]*hen[1]==hen[0]*hen[0]){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

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

int main(){
	int n=0,i=0,k=0,a,b;
	int x[100] = {0} ;
	char y[100] ={0} ;

	while(1){
	cin >> n ;

	if(n <= 1000) break ;
	}
	for(i=0;i<3*n;i+=3){

		while(1){

		cin >> x[i] >> x[i+1] >> x[i+2] ;

		if((x[i] >= 1) && x[i] <=1000){
			if((x[i+1] >= 1) && x[i+1] <=1000){
				if((x[i+2] >= 1) && x[i+2] <=1000){
					break;
				}
			}
		}
		}
		if(x[i+1] > x[i]) {
			k = x[i+1];
			x[i+1] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i]) {
			k = x[i+2];
			x[i+2] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i+1]) {
			k = x[i+2];
			x[i+2] = x[i+1];
			x[i+1] = k ;
		}
	}

	for(i=0;i< 3*n; i+=3){
				a = x[i] * x[i] ;
		b = (x[i+1] * x[i+1] ) + (x[i+2] * x[i+2]) ;

		if( a == b) cout << "YES" << endl ;
		if( a != b) cout << "NO" << endl ;

	}

    return 0;
}

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

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

int main(int,char**){
	int loops;
	std::cin >> loops;
	int a,b,c;
	while(loops--){
		std::cin >> a >> b >> c;
		if(a*a-b*b-c*c && b*b-c*c-a*a && c*c-a*a-b*b) std::cout << "NO" <<std::endl;
		else std::cout << "YES" <<std::endl;
	}
	return 0;
}

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];
}
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 << std;
}
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<cstdio>
using namespace std;
bool yes[1001];
int main()
{
	int n,a,b,c,q,i;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a>>b>>c;
		if(b>a){q=a;a=b;b=q;}
		if(c>a){q=a;a=c;c=q;}
		if((a*a)==(b*b)+(c*c))yes[i]=true;
		else yes[i]=false;
	}
	for(i=1;i<=n;i++)
	{
		if(yes[i]==true)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(){
  int a[3];
  int temp;
  int i,j;
  for(i=0;i<3;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<2;i++){
    for(j=0;j<2-i;j++){
      if(a[j]<a[j+1]){
	temp=a[j];
	a[j]=a[j+1];
	a[j+1]=temp;
      }
    }
  }
  if(a[0]*a[0]==a[1]*a[1]+a[2]*a[2]){
    printf("YES\n");
  }else{
    printf("NO\n");
  }
  return 0;
}