Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

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

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


int main()
{
	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[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
			cout<<"yes"<<endl;
		}
		else
			cout<<"no"<<endl;
	}
	return 0;
}

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

void judge(int x, int y, int z)
{    
    static bool flag = false;
    if (x * x + y * y == z * z){
        flag = true;
    }  
}


int main(void)
{
    int repeat, a, b, c;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        judge (a, b, c); 
        judge (b, c, a);
        judge (c, a, b);
        if (flag == true){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    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;
		a*=a; b*=b; c*=c;
		if(a == b+c || b == a+c || c == a+b)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}