Go: package main
import (
    "fmt"
    "os"
    "bufio"
    "strconv"
    "sort"
)
 
var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)
 
func main(){
    sc.Split(bufio.ScanWords)
    defer out.Flush()
    n := nextInt()
    for i:=0; i<n; i++{
        data := nextInts(3)
        sort.Ints(data)
        if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
            fmt.Fprintln(out, "YES")
        }else{
            fmt.Fprintln(out, "NO")
        }
    }
}
 
func next() string{
    sc.Scan()
    return sc.Text()
}
 
func nextInt() int{
    a, _ := strconv.Atoi(next())
    return a
}
 
func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

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];
        if(panjang[x][y]>1000||panjang[x][y]<1||panjang[x][y+1]>1000||panjang[x][y+1]<1||panjang[x][y+2]>1000||panjang[x][y+2]<1)
            return 0;
}
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 << endl;
}
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<stdio.h>
void temp(int x,int y,int z)
{
int tmp;
if(x<y){tmp=y;y=x;x=tmp;}
if(x<z){tmp=x;x=z;z=tmp;}
if(y<z){tmp=z;z=y;y=tmp;}
}
int main()
{
int x,y,z.n;
scanf("%d",&n);
while(n-->=0)
{
scanf("%d",&x);scanf("%d",&y);scanf("%d",&z);

temp(x,y,z);
if(x*x=y*y+z*z)printf("YES\n");
else printf("NO\n");


}
return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){

  int n;
  int triangle[3];

  cin >> n;

  while(n--){

  for( int i = 0 ; i < 3 ; i++ ){
    cin >> triangle[i]; 
  }

  sort( triangle , triangle + 3 );

  if( triangle[2] * triangle[2] == triangle[1] * triangle[1] + triangle[0] * triangle[0] ) cout << "YES" << endl;
  else cout << "NO" << endl;
  }
  return 0;
}

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

using namespace std;

int main(){
  int a, b, c, a2, b2, c2;
  while(cin>>a>>b>>c){
    a2= a*a;
    b2= b*b;
    c2= c*c;

    if((a2+b2==c2)||(b2+c2==a2)||(a2+c2==b2)){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}

C++: #include <cstdio>

int main() {
	int a,b,c,n;
	scanf("%d",&n);

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

C++: #include "StdAfx.h"
#include "AOJ0003.h"
#include <string>
#include <sstream>
#include <iostream>
#include <stack>
#include <queue>
#include <vector>
using namespace std;

vector<string> exinputstring(){
	vector<string> ss;
	string s;
	while(getline(cin,s) ){
		ss.push_back(s);
	}
	
	return ss;
}
vector<int> exinputint(){
	vector<int> ss;
	int d;
	while( !cin.eof() ) {
		cin >>d;
		ss.push_back(d);
	}
	return ss;
}

main(){
	vector<int> inp=exinputint();
	vector<int>::iterator it = inp.begin();
	for (it++;it != inp.end();){
		int a=*it;it++;
		int b=*it;it++;
		int c=*it;it++;
		if ((a>=b&&b>=c&&a*a==b*b+c*c)||
			(b>=a&&b>=c&&b*b==a*a+c*c)||
			(c>=a&&c>=b&&c*c==a*a+b*b)){
				cout<<"YES";}else{cout<<"NO";}

	}
}

C++: #include<stdio.h>
 
void right_triangle(int x, int y, int z);
 
int main(void)
{
    int n;
    scanf("%d", &n);
    int i = 0;
    int x, y, z;
    while (i < n) {
        scanf("%d %d %d", &x, &y, &z);
        right_triangle(x, y, z);
        i++;
    }
    return 0;
}
 
void right_triangle(int x, int y, int z)
{
    int i = x * x;
    int j = y * y;
    int k = z * z;
    if (i == j + k || j == k + i || k == i + j) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

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


int main(){
	int N;
	cin >> N;
	while(N--){
		int i[3],c;
		int max;
		cin >> i[0] >> i[1] >> i[2];
		sort(i,i+3);
		if(i[0]*i[0]+i[1]*i[1]==i[2]*i[2])
			cout<<"YES\n";
		else
			cout<<"NO\n";

	}
}

C++: #include<stdio.h>
/*複数のデータセットに対して、各々が直角三角形か
どうか判定する*/
void right_triangle(int x, int y, int z);

int main(void)
{
    int n;//nはデータセットの個数
    scanf("%d", &n);
    for ( int i = 0; i <n ; ++i){
    int a, b, c;//a,b,cは辺の長さ
    scanf("%d %d %d", &a, &b, &c);
    right_triangle(a , b, c);
    }
    return 0;
}    

void right_triangle( int x, int y, int z)
{
    x *= x;
    y *= y;
    z *= z;
    if (x == y + z|| y == z + x|| z == x + y){
        printf("YES\n");
    }else{
        printf("NO\n");
    }
}

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

bool judge_triangle(int j_edge[])
{
    std::sort(j_edge, j_edge + 3);
    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;
}

// "j_edge" to "j_edge+3" ha "array j_edge" no memory jyou no
// adress no hajimari to owari wo simesu. 
// Yoku miru to kou natteru ==> [hajimari, owari)

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

using namespace std;

int main(){
	int n;
	cin >> n;
	while(n--){
		int a, b, c, sum;
		cin >> a >> b >> c;
		int x, y ,z;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(x*x == y*y + z*z)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
}

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

using namespace std;

int main(){
	
	int N;
	vector<int> a(3);
	cin>>N;
	while(N>0){
		for(int i=0;i<3;i++)
			cin>>a[i];
		sort(a.begin(),a.end());
		if(pow(a[2],2.0)==pow(a[1],2.0)+pow(a[0],2.0))
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
		N--;
	}
	}

C++: #include <iostream>
#include <cmath>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main()
{
    double a,b,c,N;
    priority_queue< double, vector<double>, greater<double> > que;
    cin >> N;
    REP(i,N) {
        cin >> a >> b >> c;
        que.push(a);que.push(b);que.push(c);
        a=que.top();
        que.pop();
        b=que.top();
        que.pop();
        c=que.top();
        que.pop();
        if (a*a+b*b==c*c) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

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


return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int N;
	cin >> N;
	for(int i=0;i<N;i++){
		int a, b, c;
		cin >> a >> b >> c;
		if(a+b <= c || a+c <= b || b+c <= a){
			cout << "NO" << endl;
		}
		else{
			cout << "YES" << endl;
		}
	}
	return 0;
}