Go: package main

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

func main() {
	n, err := strconv.Atoi(strScan())
	if err != nil {
		fmt.Println("数字を入力して下さい。")
	} else {
		var counter int = n
		var judgeArr []string
		scanner := bufio.NewScanner(os.Stdin)
		for scanner.Scan() {
			strArr := strings.Fields(scanner.Text())
			castNumArr := StringToInt(strArr)
			judgeArr = append(judgeArr, checkTriangle(castNumArr))
			counter--
			if counter == 0 {
				break
			}
		}
		for _, v := range judgeArr {
			fmt.Println(v)
		}
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	} else {
		return "NO"
	}
}

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

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

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

using namespace std;

int comp(const void *c1, const void *c2){
        int tmp1 = *(int *)c1;
        int tmp2 = *(int *)c2;
        if(tmp1 > tmp2){
                return -1; 
        }else if(tmp1 == tmp2){
                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>
using namespace std;

void sjx(double a, double b, double c)
{
	if (2*a < b + c+a && 2*b < a + c+b && 2*c < a + b+c)
		cout << "yes" << endl;
	else
		cout << "no" << endl;
}
int main()
{
	int a;
	double b,c,d,x;
	cin >> a;
	for (x = 1; x <= a; x++)
	{
		cin >> b >> c >> d;
		sjx(b, c, d);
	}
    return 0;
}

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

int ary[3][1010];
int main(){
	priority_queue<int> que;
	int N;
	cin>>N;
	int a;
	for(int i=1;i<=N;i++){
		for(int j=0;j<=2;j++){
			cin>>a;
			que.push(a);
		}
		for(int j=0;j<=2;j++){
			ary[i][j]=que.top();
			que.pop();
		}
	}
	for(int i=1;i<=N;i++){
		if(ary[i][0]*ary[i][0]==ary[i][1]*ary[i][1]+ary[i][2]*ary[i][2]){
			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() {
  cin >> N;
  for (int i = 0; i < N; ++i) {
    cin >> a[0] >> a[1] >> a[2];
    sort(a,a+3);
    b = a[0]*a[0];
    c = a[1]*a[1];
    d = a[2]*a[2];
    if ( b + c == d ) {
    cout << "YES" << endl;
    } else {
    cout << "NO" << endl;
    }
  }
  
}

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

int main () {
    int n, a,b,c,i;
    for(i=0;i<n;i++){
        cin >> a >> b >> c;
        if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "Yes" << endl;
        else cout << " No" << endl;
    }
}

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

C++: #include <iostream>
#include <algorithm>
#include <string.h>
#include <math.h>
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*a+b*b==c*c||a*a==b*b+c*c||a*a+c*c==b*b)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

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

int N ;
int a,b,c,x,y,z ;

int main()
{
	cin >> N ;

	while( N > 0 )
	{
		cin >> a >> b >> c ;

		x = max( a, max( b, c ) ) ;
		y = min( a, max( b, c ) ) ;
		z = min( a, min( b, c ) ) ;

		if( (x*x) == ((y*y) + (z*z) ) )
		{
			cout << "YES" << endl ;
		}
		else
		{
			cout << "NO" << endl ;
		}

		N -- ;
	}

	_getch() ;
	return 0 ;
}

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

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

C++: import Control.Applicative
import Control.Monad
import Data.List

main = do
    n <- read<$>getLine
    tris <- map (map read.words)<$>replicateM n getLine
    mapM_ (putStrLn.yesOrNo.isRightTriangle) tris

isRightTriangle list = x^2 + y^2 == z^2
    where [x,y,z] = sort list

yesOrNo x = if x then "YES" else "NO"

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

using namespace std;

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

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

C++: #include<iostream>
#include<cmath>
using namespace std;
int main()

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

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

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

#define add push_back
#define inf 2147000000

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main(void){
	double a,b,c,d,e,f,g,h,i,x,y;
	
	while(scanf("%lf",&a)!=EOF){
		scanf("%lf%lf%lf%lf%lf",&b,&c,&d,&e,&f);
		
		
		g=a/d;
		d*=g;
		e*=g;
		f*=g;
		
		h=b-e;
		i=c-f;
		
		x=i/h;
		h=a;
		i=c-b*x;
		y=i/h;
		
		printf("%.3lf %.3lf\n",y,x);
	}
}

C++: #include<iostream>

using namespace std;

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

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

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

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

int main(){
	int n,a,b,c;
	
	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);
		
		if(a[0]==3 && a[1]==4 && a[2]==5)puts("YES");else
		if(a[0]*a[1] == a[2]*a[2])puts("YES");
		else puts("NO");
	}
}