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>
using namespace std;
int main()
{
    int n,a,b,c,i;
    cin>>n;
    for(i=0;i<n;i++)
    {
        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 <iostream>
using namespace std;

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

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
int main() {
	int n;
	std::cin >> n;
	std::vector<std::string>v;
	for (int i = 0;i < n;++i) {
		int a, b, c;
		std::cin >> a >> b >> c;
		int max = std::max(a,std::max(b,c));
		if (a*a + b*b + c*c == max*max * 2) {
			v.push_back("YES");
		}
		else {
			v.push_back("NO");
		}
	}
	for (int i = 0;n < i;++i) {
		std::cout << v[i] << std::endl;
	}
	return 0;
}

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

int main()
{
  int n;
  cin >> n;
  vector<int> tri(3);

  while(n > 0) {
    cin >> tri[0] >> tri[1] >> tri[2];
    sort(tri.begin(), tri.end());
    if(pow(tri[0], 2) + pow(tri[1], 2) == pow(tri[2], 2))
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    n--;
  }
  return 0;
}

C++: #include<stdio.h>
#define MAX_N 1000

int main() {

	int i = 0;
	int N = 0;
	int a[MAX_N], b[MAX_N], c[MAX_N];

	scanf("%d", &N);

	for(i = 0; i < N; i++) {
		scanf("%d %d %d", &a[i], &b[i], &c[i]);
	}

	for(i = 0; i < N; i++) {

		if(a[i] * a[i] + b[i] * b[i] == c[i] * c[i]) {
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
	}

	return 0;
}

C++: #include <iostream>

void judgeTriangle(int, int, int);

int main()
{
    int number;
    std::cin >> number;
    for (int i = 0; i < number; ++i) {
        int a, b, c;
        std::cin >> a >> b >> c;
        judgeTriangle(a, b, c);
    }
    return 0;
}

void judgeTriangle(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++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
	int N,i;
	int count=0;
	int a[3];
	scanf("%d ",&N);
	while(count!=N){
	for(i=0;i<3;i++){
		scanf("%d ",&a[i]);
	}
	sort(a,a+3);
	if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]){
		printf("YES\n");
		count++;
	}
	else{
		printf("NO\n");
		count++;
	}
	}
	return 0;
	}

C++: #include <bits/stdc++.h>

bool isRightTriangle(const int &a, const int &b, const int &c)
{
    int sum = a * a + b * b + c * c;
    int max = std::max(a, std::max(b, c));
    return (sum - (max * max) == max * max);


}

int main()
{
    int N, a, b, c;
    std::scanf("%d", &N);
    for (int i = 0; i < N; i++) {
        std::scanf("%d %d %d", &a, &b, &c);
        (isRightTriangle(a, b, c)) ? std::cout << "YES" << std::endl : std::cout << "NO" << std::endl;
    }
    return 0;
}

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

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

int main()
{
	int a[3],n;
	cin>>n;
	while(n>0){
		cin>>a[0]>>a[1]>>a[2];
		sort(a,a+3);

		if(a[0]*a[0] +a[1]*a[1]==a[2]*a[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		n--;
	}
	return 0;
}

C++: #include<stdio.h>
 
int main() 
{
 int x,y,z,n,tmp; 
 tmp=0;
 scanf("%d",&n); 

while(n-->0)
 { 
scanf("%d",&x);scanf("%d",&y);scanf("%d",&z);  

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;} 

if(x*x==y*y+z*z)printf("YES\n");
 else printf("NO\n");     
} 
return 0; 
}

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

inline bool is_right_triangle(int a, int b, int c){
	return (a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b) ? true : false;
}


int main() {
	ios::sync_with_stdio(false);
	int n, a, b, c;
	cin >> n;
	for(int i=0; i<n; i++){
		cin >> a >> b >> c;
		if(is_right_triangle(a,b,c)) cout << "YES" << "\n";
		else cout << "NO" << "\n";
	}

}

C++: #include <iostream>

using namespace std;

int main()
{
	int a,b, c,i,count;
	bool ret;
	scanf("%d",&count);
	for(i = 0; i < count; i++ ) {
		cin >> a >> b >> c;
		a *= a;
		b *= b;
		c *= c;
		ret = false;
		if( a + b == c ){
			ret = true;
		}
		else if( a + c == b ) {
			ret = true;
		}
		else if ( b + c == a ) {
			ret = true;
		}
		
		if( ret == true ) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}	
	}

	return 0;
}

C++: #include <iostream>

#include <vector>

#include <algorithm>

using namespace std;



int main() {

    int N;

    cin >> N;

    vector<int> sides(3);

    for (int n = 0; n != N; ++n) {

        cin >> sides[0] >> sides[1] >> sides[2];

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

        if (sides[0]*sides[0] + sides[1]*sides[1] == sides[2]*sides[2]) {

            cout << "YES" << endl; 

        }

        else {

            cout << "NO" << endl;

        }

    }

    return 0;

}

C++: #include <iostream>

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++: 
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
	int N,d[1010],i=0,j=0;
	float a,b,c;
	cin>>N;
	j=N;
		while(j--)
		{
			cin>>a>>b>>c;
			if (a*a+b*b==c*c)
				//d[i]=1;
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
				//d[i]=0;
			//i++;
		}
// 		for (i=0;i<N;i++)
// 		{
// 			if (d[i])
// 				cout<<"YES"<<endl;
// 			else
// 				cout<<"NO"<<endl;
// 		}
	return 0;
}