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<stdio.h>
int main(void)
{
	int n,i,w,a,s,d,x,j,z;
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a,&s,&d);
			if(a>s&&d<a){
				w=(d*d)+(s*s);
				x=a*a;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}	
			}	
			if(a<d&&d>s){
				w=(a*a)+(s*s);
				x=d*d;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			if(a<s&&s>d){
				w=(d*d)+(s*s);
				x=s*s;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			if(a==s&&s==d&&d==a){
				printf("NO\n");
			}	
		
		}
	return 0;
}

C++: #include <iostream>

int main ()
{
    int N, x, y, z, X, Y, Z;
    std::cin >> N;
    for (int n = N; n > 0; --n) {
        std::cin >> x >> y >> z;
        X = x * x;
        Y = y * y;
        Z = z * z;
        if (X + Y == Z || Y + Z == X || Z + X == Y) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

C++: #include <iostream>

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

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

    std::cin >> n;
    while (std::cin >> a >> b >> c) {
        if (is_right_triangle(a, b, c)) {
            std::cout << "Yes" << std::endl;
        } else {
            std::cout << "No" << std::endl;
        }
    }

    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
using namespace std;
int main() {
	int a;
	cin >> a;
	for (int b = 0; b < a; b++) {
		int c[3];
		cin >> c[0] >> c[1] >> c[2];
		sort(c, c + 3);
		if (c[0] * c[0] + c[1] * c[1] == c[2] * c[2])puts("YES");
		else puts("NO");
	}
}

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

int main()
{
int a,b,c,x,y,z;
while(cin>>a>>b>>c)
{
x=a*a;
y=b*b;
z=c*c;
if(a+b==c||b+c==a||c+a==b)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
return 0;
}

C++: #include <stdio.h>

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

    scanf("%d", &n);
    for (i = 0; i < n; i++){
        scanf("%d %d %d", &a, &b, &c);

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

    return (0);
}

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

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

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

using namespace std;


int main(){
    int a,b,c;
    int N;
    string *str;
    
    cin >> N;
    
    str=(string *)malloc(sizeof(string)*N);
    
    for(int i=0;i<N;i++){
        cin>>a>>b>>c;
        if(c==sqrt((pow((double)a,(double)2)+pow((double)b,(double)2)))) str[i]="YES";
        else str[i]="NO";
    }
    
    for(int i=0;i<N;i++) cout<<str[i]<<endl;
    
    free(str);
    
    return 0;
}

C++: #include <cstdio>
#include <string>

using namespace std;

int main()
{
        int n;
        int len[3];

        scanf("%d", &n);
        for (int i = 0; i < n; i++) {
                for (int i = 0; i < 3; i++) {
                        scanf("%d", &len[i]);
                }
                for (int i = 0; i < 2; i++) {
                        if (len[i] > len[i + 1]) {
                                int tmp = len[i];
                                len[i] = len[i + 1];
                                len[i + 1] = tmp;
                        }
                }
                string ans = ((len[0] * len[0] + len[1] * len[1]) == len[2] * len[2])
                                   ? "YES" : "NO";
                printf("%s\n", ans.c_str());
        }

        return 0;
}

C++: #include <iostream>

bool isTriangle(int a, int b, int c){
	if(a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b)	return true;
	else return false;
}

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

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

bool is_a_right_triangle(int a, int b, int c) {
        int a2 = a*a;
        int b2 = b*b;
        int c2 = c*c;

        if (a2 + b2 == c2) {
                return true;
        }

        if (a2 + c2 == b2) {
                return true;
        }

        if (b2 + c2 == a2) {
                return true;
        }

        return false;
}

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

        cin >> n;
        while(n--) {
                cin >> a >> b >> c;
                if (is_a_right_triangle(a,b,c)) {
                        cout << "YES" << endl;
                } else {
                        cout << "NO" << endl;
                }
        }

        return 0;
}

C++: #include <iostream>
 
int main()
{
    int x, a, b, c; // put space after ","
    std::cin >> x;
    for (int i = 0; i < x;i++) { // put space after ";" and after ")"
        std::cin >> a >> b >> 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 {              // indent is like this;this "}" ends "if () {" structure.
                              // put space at both sides of "else"
            std::cout << "NO" << std::endl;
        } // indent is like this; this "}" ends "else {" structure
    } // indent is like this.
    return 0;
}

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

int main(){
	long n;
	cin >> n;
	for (long i = 0; i < n; i++){
		vector<long> edge(3);
		cin >> edge[0] >> edge[1] >> edge[2];
		sort(edge.begin(), edge.end());
		if (edge[0] * edge[0] + edge[1] * edge[1] == edge[2] * edge[2]){
			cout << "YES" << endl;
		} 
		else cout << "NO" << endl;
	}
	return 0;
}