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,z,y,x;
	cin>>n;
	while(n-->0){
		cin>>x>>y>>z;
		x*=x;
		y*=y;
		z*=z;
		if(x+y==z||x+z==y||y+z==x)
		cout<<"YES"<<endl;
		else
		cout<<"NO"<<endl;
	}
	return 0;
}

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


long long n,i,a[10];

int main(){
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	cin>>n;
	for(i=0; i<n; i++){
		cin>>a[0]>>a[1]>>a[2];
		sort(a,a+3);
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
			cout<<"YES"<<'\n';
		}else
			cout<<"NO"<<'\n';
	}
	
	
	
return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main() {
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int a[3];
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		cout << (hypot(a[0], a[1]) == a[2] ? "YES\n" : "NO\n");
	}
}

C++: #include <stdio.h>

int main (void)
{
	int n, i;
	int a, b, c;
	
	scanf("%d", &n);
	
	for (i=0; i<n; i++)
	{
		scanf("%d %d %d", &a, &b, &c);
		
		// find maximum
		if (a > b && a > c)
		{
			if (a*a == b*b + c*c)
			{
				printf("YES\n");
			}else
			{
				printf("NO\n");
			}
		}
		else if (b > a && b > c)
		{
			if (b*b == a*a + c*c)
			{
				printf("YES\n");
			}else
			{
				printf("NO\n");
			}
		}
		else
		{
			if (c*c == b*b + a*a)
			{
				printf("YES\n");
			}else
			{
				printf("NO\n");
			}
		}
	}
}

C++: #include<iostream>

using namespace std;

int main(){

	int num,i,j;
	
	cout << "the number of data set: ";
	cin >> num;
	
	int a[num],b[num],c[num];
	
	for(i=0;i<num;i++){
		do{
			cin >> a[i] >> b[i] >> c[i];
		}while((a[i]<0||a[i]>1000)&&(b[i]<0||b[i]>1000)&&(c[i]<0||c[i]>1000));
	}
	
	int triangle[3];
	for(i=0;i<num;i++){
		triangle[0] = a[i];
		triangle[1] = b[i];
		triangle[2] = c[i];
		
		int max,max_num;
		max = triangle[0];
		max_num = 0;
		for(j=0;j<3;j++){
			if(max<triangle[j]){
				max = triangle[j];
				max_num = j;
			}
		}
		switch(max_num){
			case(0):if(a[i]*a[i] == b[i]*b[i] + c[i]*c[i]) cout << "YES\n";
					else cout << "NO\n";
					break;
			case(1):if(b[i]*b[i] == a[i]*a[i] + c[i]*c[i]) cout << "NO\n";
					else cout << "NO\n";
					break;
			case(2):if(c[i]*c[i] == a[i]*a[i] + b[i]*b[i]) cout << "YES\n";
					else cout << "NO\n";
					break;
			default:break;
		}
	}
	
	return 0;
}

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

bool judge(int, int, int);

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

bool judge(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;
	}
}

C++: #include<stdio.h>
/*複数のデータセットに対して、各々が直角三角形か
どうか判定する*/
void right_triangle(int x, int y, int z);

int main(void)
{
    int n;//nはデータセットの個数
    scanf("%d", &n);
    for ( int i = 0; i <n ; ++i){
        int a, b, c;//a,b,cは辺の長さ
        scanf("%d %d %d", &a, &b, &c);
        right_triangle(a , b, c);
    }
    return 0;
}    

void right_triangle( int x, int y, int z)
{
    x *= x;
    y *= y;
    z *= z;
    if (x == y + z|| y == z + x|| z == x + y){
        printf("YES\n");
    }else{
        printf("NO\n");
    }
}

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

int main(){
	int a,b,c,i,n;
	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>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    int n;
    vector<int> side(3);

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

    return 0;
}

C++: #include <stdio.h>

void right_triangle(int a, int b, int c);

int main(void)
{
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) {
        int a, b, c;
        scanf("%d %d %d", &a, &b, &c);
        right_triangle(a, b, c);
    }
    return 0;
}

void right_triangle(int a, int b, int c)
{
    int x, y, z;
    if (a <= b) {
        if (b <= c) {
            x = a;
            y = b;
            z = c;
        } else {
            x = a;
            y = c;
            z = b;
        }
    } else {
        if (a <= c) {
            x = a;
            y = b;
            z = c;
        } else {
            x = b;
            y = c;
            z = a;
        }
    }
    //ここまででzに最大値を持ってきた
    if (x * x + y * y == z * z) {
    printf("YES\n");
    } else {
    printf("NO\n");
    }
}

C++: #include <iostream>
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))) || ((y*y) == ((x*x) + (z*z))) || ((z*z) == ((x*x) + (y*y))) )
		{
			cout << "YES" << endl ;
		}
		else
		{
			cout << "NO" << endl ;
		}

		N -- ;
	}

	return 0 ;
}

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

int main(void){
    int line_number;
    int l, m, n;
    
    cin >> line_number; 

    for(int i = 0; i < line_number; i++){
        // gets input
        cin >> l >> m >> n;
        
        // check
        if(l*l+m*m==n*n || m*m+n*n==l*l || n*n+l*l==m*m){
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

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

using namespace std;


int main(){
	int t;
	cin>>t;
	while(t--){
		int a[3];
		cin>>a[0]>>a[1]>>a[2];
		sort(a,a+3);
		bool f = false;
		if(a[0]*a[0] + a[1] * a[1] == a[2] * a[2])
			f = true;

		cout << (f ? "YES" : "NO")  << endl;
	}
  return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int number, x, y, z;
	scanf("%d", &number);
	for (int i = 0; i < number; i++) {
		scanf("%d %d %d", &x, &y, &z);
		if (x * x == y * y + z * z || y * y == x * x + z * z || z * z == x * x + y * y) {
			printf("YES\n");
		}else {
			printf("NO\n");
		}
	}
	return 0;
}

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

int main()
{
    int t;
    cin>>t;
    while(t--){
    int a[3];
    for(int i=0;i<3;i++)
        cin>>a[i];
    sort(a,a+3);
    ll ot=(a[0]*a[0])+(a[1]*a[1]);
    ot=sqrt(ot);
    if(ot==a[2]) cout<<"YES\n";
    else cout<<"NO\n";
    }
    return 0;
}