Go: package main

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

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		for i, c := range strings.Split(sc.Text(), " ") {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		sort.IntSlice(edges).Sort()
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

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

using namespace std;

int main(void) {
	int N;
	cin >> N;

	int a, b, c, i;
	vector<string> res;
	for (i = 0; i < N; i++) {
		cin >> a >> b >> c;

		int aj = a * a;
		int bj = b * b;
		int cj = c * c;

		if (aj < bj) {
			if (bj < cj) {
				if (cj == aj + bj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
			else {
				if (bj == aj + cj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
		}
		else {
			if (aj < cj) {
				if (cj == aj + bj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
			else {
				if (aj == bj + cj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
		}
	}

	for (i = 0; i < res.size(); i++) {
		cout << res[i] << endl;
	}

	return 0;
}

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


using namespace std;

bool check(vector<int> n){
	if(n[0]*n[0]+n[1]*n[1]==n[2]*n[2])return true;
	else false;
}

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		vector<int> hoge;
		cin>>a>>b>>c;
		hoge.push_back(a);
		hoge.push_back(b);
		hoge.push_back(c);
		sort(hoge.begin(),hoge.end());
		cout<< ( check(hoge)==true ? "YES" : "NO")<<endl;
	}
	return 0;
}

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

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

int main() {
  int n;
  int a[3];
  cin >> n;
  for (int i = 0; i < n; i++) {
    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\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}

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

using namespace std;

int main(){
	int n;

	cin >> n;
	
	for(int i = 0; i < n; i++){
		int tate,yoko,naname;
		cin >> tate >> yoko >> naname;

		if(tate > naname){
			swap(tate,naname);
		}

		if(yoko > naname){
			swap(yoko,naname);
	}

		if(naname * naname == tate * tate + yoko * yoko)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	return 0;
}

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
int main() {
	double a, b, c;
	std::vector<std::string>v;
	while(std::cin>>a>>b>>c){
		double max = std::max(a, std::max(b, c));
		if (2*max*max==a*a+b*b+c*c ) {
			v.push_back  ("yes");
		}
		else {
			v.push_back  ("no");
		}
	}
	for (double n = 0; n < v.size(); ++n) {
		std::cout << v[n] << std::endl;
	}
	return 0;
}

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

using namespace std;

int main(int argc, char const* argv[])
{
	double a,b,c,n;

	cin >> n;

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

		if( a == sqrt( b * b + c * c ) || b == sqrt( a * a + c * c ) || c == sqrt( a * a + b * b ) ) cout << "YES" << endl;
		else cout << "NO" << endl;
	}

	return 0;

}

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

void judgement(int a,int b,int c) {
	if (a == b && b == c) {
		cout << "NO" << endl;
		return;
	}
	else if ((a ^ 2) == (b ^ 2) + (c ^ 2) || (b ^ 2) == (a ^ 2) + (c ^ 2) || (c ^ 2) == (a ^ 2) + (b ^ 2)) {
		cout << "YES" << endl;
		return;
	}
	else {
		cout << "NO" << endl;
		return;
	}
}

int main() {
	unsigned int n;//dataset

	cin >> n;

	vector<int> vector_a;
	vector<int> vector_b;
	vector<int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}

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

bool judge_triangle(int j_edge[])
{
    std::sort(j_edge, j_edge + 2); 
    return j_edge[2] * j_edge[2] == j_edge[0] * j_edge[0] + j_edge[1] * j_edge[1];
}

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

    for (int i = 0; i < num; i++) {

        int edge[3];
        std::cin >> edge[0] >> edge[1] >> edge[2];

        if (judge_triangle(edge)) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }   
    return 0;
}

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

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

C++: #include <iostream>

bool checkTriangle(int a, int b, int c)
{
	if((a >= b) && (a >= c)) {
		return (a*a == (b*b + c*c));
	} else if((b >= a) && (b >= c)) {
		return (b*b == (a*a + c*c));
	} else {
		return (c*c == (a*a + b*b));
	}
}

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

C++: #include<iostream>
#include <algorithm>
 
using namespace std;
 
void triangleCal()
{
    int n;
    int side[3];
  
    cin >>n;
    
    while(n--)  //instead of "for"
    {
        cin >>side[0]>>side[1]>>side[2]; 
        
        sort(side, side+3); // sort date by ascending order
        
       if(side[2] * side[2] == side[1] * side[1] + side[0] * side[0]) 
       {
           cout <<"YES"<<endl;
       }
       else
       {
           cout <<"NO"<<endl;
       }
    }
    
    return;
}
   
int main(){
   
    triangleCal();
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int N;
    cin>>N;
    int i;
    for(i=0;i<=N-1;i++){
        int a,b,c;
        cin>>a>>b>>c;
        int A,B,C;
        A=a*a;
        B=b*b;
        C=c*c;
        if(A==B+C)  cout<<"YES";
        else if(B==A+C)  cout<<"YES";
        else if(C==A+B) cout<<"YES";
        else    cout<<"NO";
        cout<<endl;
    }
}

C++: #include<iostream>

using namespace std;

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

		}else{			
			if(c*c == a*a + b*b) cout << "YES" << endl;
			else cout << "NO" <<endl;
		}
		n--;
	}
	return 0;
}

C++: #include<cstdio>
int main(){scanf("%*d");for(int a,b,c;~scanf("%d%d%d",&a,&b,&c);puts(b+c-a&&a+c-b&&a+b-c?"NO":"YES")){a*=a;b*=b;c*=c;}}