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 <iostream>
#include <vector>

int main(){
	unsigned int N;
	unsigned int a,b,c;
	std::vector<bool> ans;

	std::cin >> N;

	for(int i = 0; i < N; i++){
		std::cin >> a >> b >> c;
		if(	(a*a + b*b == c*c) ||
			(a*a + c*c == b*b) ||
			(c*c + b*b == a*a)){
			ans.push_back(true);
		}else{
			ans.push_back(false);
		}
	}

	for(auto&& a : ans){
		if(a){
			std::cout << "YES" << std::endl;
		}else{
			std::cout << "NO" << std::endl;
		}
	}
}

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d %d %d",&x,&y,&z);
	for(i=0;i<N;i++){
		if((x^2+y^2)==z^2||(x^2+z^2)==y^2||(y^2+z^2)==x^2){
			printf("Yes\n");
		}
		else {
			printf("No\n");
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a, b, c;
	int n;
	cin >> n;

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

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

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


int main() {
	int n;
	cin >> n;
	int a[1000];
	int b[1000];
	int c[1000];
	int d[3];

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

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

int main(){
	int a,b,c,q;
	cin >> q;
	auto f=[&]{
		cin >> a >> b >> c;
		int x = max({a,b,c});
		int y = min({a,b,c});
		int z = a+b+c-x-y;
		if((x*x)==(y*y+z*z)){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	};
	while(q--){
		f();
	}
}

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

using namespace std;

int main() {
	int N, S[3];
	cin >> N;
	while(N-- > 0) {
		for(int i = 0; i < 3; i++)
			cin >> S[i];
		sort(S, S + 3);
		cout << (S[0] * S[0] + S[1] * S[1] == S[2] * S[2] ? "YES" : "NO") << endl;
	}
}

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

void swap(int& a, int& b)
{
  int tmp = a;
  a = b;
  b = tmp;
}

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

    if(a * a + b * b == c * c)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}

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

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

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

    a *= a;
    b *= b;
    c *= c;

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

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

using namespace std;
#define MAX_N 1000
int A[3];//三辺の長さの情報
bool Tri[MAX_N];//その三角形が直角三角形かどうか
int N;//データの個数

int main(){
  scanf("%d",&N);
  for(int j = 0;j < N;j++){
    for(int i = 0;i < 3;i++){
      cin >>A[i];
    }
    sort(A,A+N);
     Tri[j] = false;
    if(A[2]*A[2] == A[1]*A[1] + A[0]*A[0]&&A[0] !=0) {
      Tri[j] =true;
    }
    if(Tri[j])
      cout <<"YES"<<endl;
    else
      cout <<"NO"<<endl;
  }
  return 0;
}

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

int main(void){
	int n;

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

		cin>>a>>b>>c;
		a *= a;
		b *= b;
		c *= c;

		if(a+b==c || b+c==a || c+a==b){
			cout<<"YES\n";
		}
		else{
			cout<<"NO\n";
		}
	}

	return 0;
}

C++: #include <cstdio>

int main(){
	int n;
	int a[3];
	scanf("%d",&n);

	for (int i=0;i<n;++i){
		for (int j=0;j<3;++j) scanf("%d",a+j);
		bool z=false;
		for (int k=0;k<3;++k)
			if (a[k]*a[k]+a[(k+1)%3]*a[(k+1)%3]==a[(k+2)%3]*a[(k+2)%3])
				z=true;
		if (z) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

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

	int a;
	int b;
	int c;
	int d;

		cin >> d;

		for(int i=1; i<=d; i++){

	cin >> a >> b >> c;

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

	cout << "YES" << endl;

		}	

	else	{

		cout << "NO" << endl;

		}
	}

	return 0;
}

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


int main()
{
	int n,a,b,c;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		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<iostream>
using namespace std;
int main(void){
	int N,a,b,c;
	cin>>N;
	for(int i=1;i<=N;i++){
		cin>>a>>b>>c;
		if((a*a)+(b*b)==(c*c)){
			cout<<"Yes"<<endl;
		}
		else{
			cout<<"No"<<endl;
		}
	}
	return 0;
}

C++: #include <iostream>

int IIRT(int a, int b, int c);

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

int IIRT(int a, int b, int c)
{
    if ((a*a + b*b) == c*c) {
        return 1;
    } else if ((b*b + c*c) == a*a) {
        return 1;
    } else if ((c*c + a*a) == b*b) {
        return 1;
    } else {
        return 0;
    }
}

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

bool check_right_triangle(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)
        return true;
    else return false;
}

int main()
{
    const int max_num_of_data = 1000;
    const int min = 1;
    const int max = 1000;
    
    int num_of_data;
    //std::cout << "データ数の入力" << std::endl;
    std::cin >> num_of_data;
    if(num_of_data > max_num_of_data){
        std::cout << "データ数<=" << max_num_of_data << std::endl;
        return 1;
    }
    
    int a, b, c;
    //std::cout << num_of_data << "個の整数データa b cの入力" << std::endl;
    for(int i = 0; i < num_of_data; ++i){
        std::cin >> a >> b >> c;
        if(min <= a && a <= max && min <= b && b <= max && min <= c && c <= max){
            if(check_right_triangle(a, b, c))
                std::cout << "Yes" << std::endl;
            else
                std::cout << "No" << std::endl;
        }else{
            --i;
            std::cout << "整数は" << min <<"以上" << max << "以下に設定" << std::endl;
        }
    }

    return 0;
}

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

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