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)
		cols := sort.StringSlice(strings.Split(sc.Text(), " "))
		cols.Sort()
		for i, c := range cols {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

C++: #include<iostream>
using namespace std;
int main(){
  int a,b,c;
  while(cin>>a>>b>>c){
  if(a*a == b*b+c*c)
    cout<<"YES"<<endl;
  else if(b*b == a*a+c*c)
    cout<<"YES"<<endl;
  else if(c*c == b*b+a*a)
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
  }
  return 0;
}

C++: #include<stdio.h>
int main()
{
    int a,b,c,t,i;
    scanf("%d",&t);
    for(i=1;i<=t;i++){
        scanf("%d%d%d",&a,&b,&c);
        if(a>b&&a>c&&(a*a)==(b*b)+(c*c))
            printf("YES\n");
        else if(b>c&&b>a&&(b*b)==(a*a)+(c*c))
            printf("YES\n");
        else if(c>a&&c>b&&(c*c)==(a*a)+(b*b))
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}

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

int main()
{
    double a,b,c,d,e,f;
    
    while(cin>>a>>b>>c>>d>>e>>f){
    
        double x=(e*c-b*f)/(e*a-b*d);
        double y=(d*c-a*f)/(d*b-a*e);
    
        printf("%.3f %.3f\n",x,y);
    }
    
    return 0;
    
}

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

int main() {
    string str;
    int n;
    cin >> n;
    vector<int> vx, vy, vz;
    for(int i = 0; i < n; i++) {
        int x, y, z;
        cin >> x >> y >> z;
        vx.push_back(x);
        vy.push_back(y);
        vz.push_back(z);
    }
    
    for(int i = 0; i < n; i++) {
        vector<int> v;
        v.push_back(vx[i]);
        v.push_back(vy[i]);
        v.push_back(vz[i]);

        sort(v.begin(), v.end());
        if(pow(v[2],2.0) == pow(v[0],2.0) + pow(v[1],2.0)){
            str = "YES";
        } else {
            str = "NO";
        }
        cout << str << endl;
    }  
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
//	freopen("testcase.tri", "r", stdin);
	string str = "";
	int n;

	getline (cin, str );
	stringstream ssn(str);
	ssn >> n;

	int i;
	int a, b, c;
	vector <int> side(3,0);

	for (i = 0; i < n; ++i){
		getline (cin, str );
		stringstream ss(str);
		ss >> a >> b >> c;
		side[0] = a; side[1] = b; side[2] = c;		
		sort (side.begin(), side.end() );

		if (side[2] < side[0] + side[1] && side[2]*side[2] == side[1]*side[1] + side[0]*side[0]){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if
	} // end for
		
	return 0;
}

C++: #include <stdio.h>

int main(){

	int N = 0, a=0, b=0, c=0,i;

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

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

int main(){
	int N;
	int i=0;
	int hyp=0,cat=0;
	int x=0;
	
	cout << "How many date sets (N<=1000) N=";
	cin >> N;
	int side[N][3];
	
	while(i<N){
		cout << "please input length : ";
		cin >> side[i][0] >> side[i][1] >> side[i][2];
		if(1<=side[i][0] && side[i][0]<= 1000){
			if(1<=side[i][1] && side[i][1]<= 1000){
				if(1<=side[i][2] && side[i][2]<= 1000)
					i++;
			}
		}
		else
			cout << "error 1<=length<=1000\n";
	}
	
	for(int j=0; j<i; j++){
		for(int k=0; k<3; k++){
			x = side[j][k]*side[j][k];
			if(hyp <= x){
				cat += hyp;
				hyp = x;
			}
			else
				cat += x;
		}
		if(hyp == cat)
			cout << "Yes\n";
		else
			cout << "No\n";
		hyp=0;
		cat=0;
	}
	
	return 0;
}

C++: #include <stdio.h>

enum {YES, NO} y_n;

int tri_judge(int x, int y, int z);
int pow2(int x);

int main(void)
{
    int dataset;
    scanf("%d", &dataset);

    int side1, side2, side3;
    while (dataset--){
        scanf("%d %d %d", &side1, &side2, &side3);
        y_n = tri_judge(side1, side2, side3);
        if (y_n == YES){
            printf("YES\n");
        } else {
            printf("NO\n");
        }

    }

    return 0;
}

int tri_judge(int x, int y, int z)
{
    if (pow2(x) == pow2(y) + pow2(z)){
        y_n = YES;
    } else if (pow2(y) == pow2(z) + pow2(x)){
        y_n = YES;
    } else if (pow2(z) == pow2(x) + pow2(y)){
        y_n = YES;
    } else {
        y_n = NO;
    }

    return y_n;
}

int pow2(int x)
{
    return x * x;
}

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;
		if (a > b&&a > c) {
			if (a*a == b * b + c * c)
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		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;
		}
	}
    return 0;
}

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

int main(void){
  int a[10],b[10],c[10],i,j;
  scanf("%d",&i);
  for(j=0;j<i;j++){
    scanf("%d %d %d",&a[j],&b[j],&c[j]);
  }
  for(j=0;j<i;j++){
    if((a[j]*a[j]+ b[j]*b[j] == c[j]*c[j])||(a[j]*a[j] + c[j]*c[j] == b[j]*b[j])||(b[j]*b[j]+c[j]*c[j] ==a[j]*a[j])){
      printf("%d %d %d\n",a[j],b[j],c[j]);
      printf("YES\n");
    }
    else
      printf("NO\n");
  }
  return 0;
}

C++: #include<cstdio>
int main()
{
	int N;
	scanf("%d", &N);
	while(N--)
	{
		int a, b, c;
		scanf("%d%d%d", &a, &b, &c);
		if(a > b)
		{
			a = a ^ b;
			b = a ^ b;
			a = a ^ b;
		}
		if(a > c)
		{
			a = a ^ c;
			c = a ^ c;
			a = a ^ c;
		}
		if(b > c)
		{
			b = b ^ c;
			c = b ^ c;
			b = b ^ c;
		}
		if(a + b > c && a * a + b * b == c * c)
		{
			printf("YES\n");
		}
		else printf("NO\n");
	}
	return 0;
}

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

string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

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

  cin >> N;
    
        if(N <= 0 || N > 1000){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(a < 1 || a > 1000 || b < 1 || b > 1000 || c < 1 || c > 1000){
            
            break;
        }
        
        else{
            x[N-1] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

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