Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

//直角三角形の判定
bool Get_triangle(int a,int b,int c){
    if(pow(a,2)+pow(b,2) == pow(c,2))
        return true;
    else
        return false;
}

//与えられたデータに対しての直角三角形の判定
string Judge_triangle(int a,int b,int c){
    if(Get_triangle(a,b,c) || Get_triangle(b,c,a) ||Get_triangle(c,a,b)){
        return "YES";
    }
    else{
        return "NO";
    }
}

//与えられたデータが条件に合うかの判定
bool Judge_line(int x){
    if(1<=x || x<=1000 || ceil(x) == floor(x))
        return true;
    else
        return false;
}

//main
int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            x[n] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
        
        else{
            break;
        }
  }
}
    
    //結果の表示
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[999]={0},y[999]={0},z[999]={0},hantei[999]={0};
	int j=0,e =0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<1 || 1000<x[j] || y[j]<1 || 1000<y[j] || z[j]<1 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
		}
	   
	switch(hantei[i])
	    {
		   case 0:
			  printf("No\n");
			  break;
		   case 1:
			  printf("Yes\n");
		      break;
	   }
	}

	return 0;
}

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

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	int max_num = max(a, max(b, c));
	int sub1, sub2;
	if (max_num != a) {
		sub1 = a;
		if (max_num != b) sub2 = b;
		else sub2 = c;
	} else if (max_num != b) {
		sub1 = b;
		sub2 = c;
	} 		
	if (pow(max_num, 2) == pow(sub1, 2) + pow(sub2, 2)) f = true;
	if (f) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main() {
	int num, a, b, c;
	cin >> num;
	for (int i=0; i<num; i++) {
		cin >> a >> b >> c;
		solve(a,b,c);
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n;
cin >> n;
for(int m = 1;m <= n;m++){
int a[3];
cin >>a[0]>>a[1]>>a[2];
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 <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;

#define FOR(i,s,e) for (int i = int(s); i != int(e); i++)
#define REP(i,e) for (int i = 0; i != int(e); i++)
#define FORIT(i, A) for (auto i : A)
#define ISEQ(c) (c).begin(), (c).end()
#define PRINT(x) cout << (x) << endl
#define SZ(x) ((int)(x).size())

int main(int argc, char const *argv[])
{
	int l;
	scanf("%d", &l);
	REP(i,l)
	{
		int a,b,c;
		scanf("%d %d %d", &a, &b, &c);
		a *= a;
		b *= b;
		c *= c;
		if (a == b+c || b == a+c || c == a+b)
		{
			printf("YES\n");
		}
		else
			printf("NO\n");
	}
	return 0;
}

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

using namespace std;

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

C++: #include <iostream>

int main()
{
    int n;
    std::cin >> n;

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

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

using namespace std;

long dd(int n){
	return n*n;
}

int main(){
	int n, t[3];
	
	cin >> n;
	for(int i=0; i<n; ++i){
		for(int j=0; j<3; ++j)
		scanf(" %d", &t[j]);
	 		
		sort(t, t+3);
		
		if( dd(t[2]) == dd(t[0])+dd(t[1]) ) printf("YES\n");
		else printf("NO\n");
	}
	 
	return 0;
}

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

string Right(int a,int b,int c){
    string s;
    if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
        s = "YES";
    else s="NO";

    return s;
}

int main(){
    int n;
    int a,b,c;
    string s;
    while(cin >> n){
        for(int i=0;i<n;i++){
            cin >> a >> b >> c;
            s = Right(a,b,c);
            cout << s << endl;
        }
    }

    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(a); V.push_back(b); V.push_back(c);
        std::sort(V.begin(), V.end());
        if (pow(V[2], 2) == pow(V[0], 2) + pow(V[1], 2)) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}

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

C++: #include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main() {
	int n;
	scanf(" %d", &n);
	rep(i,n) {
		vector<int> l(3);
		rep(j,3) {
			scanf(" %d", &l[j]);
		}
		int maxl = max<int>(l[0], max<int>(l[1], l[2]));
		for(int k = 0; k < 3; k++) {
			if(l[k] == maxl) {
				l[k] = 0;
				break;
			}
		}
		int s = 0;
		rep(k, 3) {
			s += l[k] * l[k];
		}
		puts(maxl * maxl == s ? "YES" : "NO");
	}
	return 0;
}

C++: #include <iostream>

using namespace std;


bool check( int a, int b, int c )
{
	if( ( a * a ) == ( b * b ) + ( c * c ) )
	{
		return true;
	}else{
		return false;
	}
}
int main()
{
	int a, b, c, max;

	while( cin >> a >> b >> c )
	{
		if( check( a, b, c ) || check( b, a, c ) || check( c, a, b ) )
		{
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
		
	}
	return 0;
}

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

int N;
int a[3]; 
int b,c,d;

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    b = a[1]*a[1];
    c = a[2]*a[2];
    d = a[3]*a[3];
    if ( b + c == d ) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  
}