Go: package main

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

func sliceAtof64(sa []string) ([]float64, error) {
	si := make([]float64, 0, len(sa))
	for _, a := range sa {
		i, err := strconv.ParseFloat(a, 64)
		if err != nil {
			return si, err
		}
		si = append(si, i)
	}
	return si, nil
}

func answer(ans bool) {
	if ans {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
func isRightTriangle(ary []float64) (ans bool) {
	sort.Sort(sort.Reverse(sort.Float64Slice(ary)))
	ans = math.Pow(ary[1], 2.0)+math.Pow(ary[2], 2.0) == math.Pow(ary[0], 2.0)

	return
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	lineCount, _ := strconv.Atoi(scanner.Text())
	lines := make([]string, lineCount)

	for i := 0; i < lineCount; i++ {
		scanner.Scan()
		lines[i] = scanner.Text()
	}

	for _, v := range lines {
		ary, _ := sliceAtof64(strings.Split(v, " "))
		answer(isRightTriangle(ary))
	}
}

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

using namespace std;

int main(){
        int a, b, c, i;
        bool ans = false;
        while(scanf("%d%d%d", &a, &b, &c) != EOF){ 
                ans = false;
                if(a * a + b * b == c * c)
                        ans = true;
                if(b * b + c * c == a * a)
                        ans = true;
                if(c * c + a * a == b * b)
                        ans = true;
                printf("%s\n", ans ? "YES" : "NO");
        }
        return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <iomanip>
#include <queue>
using namespace std;


int GetDigit(int n){
	int i = 0;

	while(n > 0){
		n /= 10;
		i++;
	}

	return i;
}
 
int main(){
	vector<int> a(3);
	int n, tmp;

	cin >> n;

	for(int i = 0; i < n; i++){
		for(int j = 0; j < 3; j++){
			cin >> a[j];
		}
		sort(a.begin(), a.end());

		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>
int main(void)
{
	int n=1;
	int i=0;
	int a,b,c;
	int irekae=0;
		scanf("%d",&n);
			for (i=0;i<n;i++)
			{
				scanf("%d",&a);
				scanf("%d",&b);
				if (a<b)
				{
					irekae=a;
					a=b;
					b=irekae;
				}
				scanf("%d",&c);
				if (a>c)
				{
					irekae=a;
					a=c;
					c=irekae;
				}
				if (c*c==a*a+b*b)
				{
					printf("Yes\n");
				}
				else
				{
					printf("No\n");
				}
			}
}

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

using namespace std;


int main(){
	int n;
	cin>>n;
	int hen1,hen2,hen3,saidai,max_pos=1;

	for(int i=0;i<n;i++){
		cin>>hen1>>hen2>>hen3;

		saidai=hen1;
		if(saidai<hen2){
			saidai=hen2;
			max_pos=2;
		}
		if(saidai<hen3){
			saidai=hen3;
			max_pos=3;
		}
		switch(max_pos){
		case 1:
			hen1=0;
			break;
		case 2:
			hen2=0;
			break;
		case 3:
			hen3=0;
			break;
		}
		if(saidai*saidai==(hen1*hen1+hen2*hen2+hen3*hen3))
			cout<<"YES"<<"\n";
		else{
			cout<<"NO"<<"\n";
		}
	}
	
	
	return 0;
}

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

int main(){ 
    int a,b,c,s;
    string res;

    cin >> s;
    while(s>0){
        cin >> a >> b >> c; 
        a = a*a;
        b = b*b;
        c = c*c;
        res = "YES";
        if(a!=(b+c) && b!=(a+c) && c!=(a+b)) res="NO";
        cout << res << endl;
        s--;    
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int i,j,d,k,n1,n2,n3,temp;
 int l[3];

int rt()
{
//入力
cin >> n1 >> n2 >> n3;
while(n1 <= 1 or n1 >= 1000 or n2 <= 1 or n2 >=1000 or n3 <= 1 or n3 >= 1000){
cin >> n1 >> n2 >> n3;
}
 //  if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[0]=n1;
       l[1]=n2;
       l[2]=n3;
        for (i = 0; i < 2; i++) {
        for (j = 2; j > i; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[j];  
                l[j] = l[j - 1];
                l[j - 1] = temp;
            }
        }
    }
   //}
    if(l[2]*l[2] == (l[1]*l[1]+l[0]*l[0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}




int main(){

   cin >> d;
   while(d <= 1 or d >= 1000){
       cin >> d;
   }

for(k=0;k<d;k++){
    rt();
}

    return 0;
}

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

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

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

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

C++: #include <stdio.h>
 
int i, N, a, b, c, A, B, C;

int print(void)
{
    if (C == A + B) {
        printf("YES\n");
    } else if (A == B + C) {
        printf("YES\n");
    } else if (B == C + A) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

int main(void)
{
    scanf("%d", &N);
    for (i = 0; i < N; i++) {
    scanf("%d %d %d\n", &a, &b, &c);
    A = a * a;
    B = b * b;
    C = c * c;
    print();
    }
    return 0;
}

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

using namespace std;

int main(void) {
	int n, a[3];
	
	cin >> n;

	for(int i = 0; i < n; i++) {
		cin >> a[0] >> a[1] >> a[2];
		
		sort(a, a + 3);
		
		if(a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}

	return 0;
}

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

using namespace std;

int main(void){
	int n,val[3];

	cin >> n;
	for(int i=0;i<n;i++){
		for(int j=0;j<3;j++)
			cin >> val[j];

		for(int j=0;j<2;j++)
	        	for(int k=0;k<1-j;k++)
        			if(val[k]>val[k+1]){
                			int tmp = val[k];
                			val[k]=val[k+1];
                			val[k+1]=tmp;
				}

		string str = (pow(val[2],2.0)==pow(val[0],2.0)+pow(val[1],2.0))?"YES":"NO";
		cout << str << endl;
	}

	return 0;
}

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

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

  while(n!=0){
    vector<int> e(3); cin>>e[0]>>e[1]>>e[2]; 

    sort(e.begin(),e.end());

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

    --n;
  }

  return EXIT_SUCCESS;
}

C++: #include <iostream>
int main() {
  int N,a,b,c;
  std::cin >> N;
  for (int i = 0; i < N; i++) {
    std::cin >> a >> b >> c;
    if (a+b>c && b+c>a && c+a>b) {
      std::cout << "YES";
    } else {
      std::cout << "NO";
    }
    std::cout << std::endl;
  }
}

C++: #include <bits/stdc++.h>
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define REP(i, n) FOR(i, 0, n)
using namespace std;

int main(){
    int n;
    cin >> n;
    REP(i, n) {
        int a, b, c; cin >> a >> b >> c;
        (a*a+b*b-c*c) / 2*a*b == 0 ? cout << "YES" << endl : cout << "NO" << endl;
    }
}

C++: #include<iostream>
int main(void){
	int a,b,c,n,i;
	std::cin>>n;
	for(i=0;i<n;i++){
		std::cin>>a>>b>>c;
		if(a*a==b*b+c*c)std::cout<<"YES"<<std::endl;
		else if(b*b==a*a+c*c)std::cout<<"YES"<<std::endl;
		else if(c*c==a*a+b*b)std::cout<<"YES"<<std::endl;
		else                 std::cout<<"NO"<<std::endl;
		}
	system("pause");
    return 0;
}

C++: #include<stdio.h>

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

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

int main() {
	int n;
	cin >> n;
	
	while(n--) {
		int a, b, c;
		cin >> a >> b >> c;

		if (a*a == b*b + c*c ||
			b*b == a*a + c*c ||
			c*c == b*b + a*a) 

			cout << "YES" << endl;

		else
			cout << "NO" << endl;
	}

	return 0;
}