Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

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)

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
  
using namespace std;
  
int main(void){
  int n,array[3],i;
  
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d",&array[0],&array[1],&array[2]);
    sort(array,array+3);
    if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2])  printf("YES\n");
    else  printf("NO\n");
  }
  
  return 0;
}

C++: //	??´?§?????§???¢ 
#include<iostream>
using namespace std;

int abs(int t) {
	if (t < 0) {
		t = t * -1;
	}
	return t;
}
int main() {
	int a,b,c;
	cin >> a >> b >> c;
	if (a + b > c && a + c > b && b + c > a){
		if ( ((a*a + b*b) == c*c) ||  ((a*a + c*c) == b*b) || ((b*b + c*c) == a*a) ){
			cout << "yes" << endl;
			return 0;
		}
	}
	cout << "no" << endl;
}

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

int main(){
	int n;
	std::cin>>n;
	for(int i=0;i<n;i++){
		std::vector<int>v(3,0);		
		for(int j=0;j<3;j++)std::cin>>v[j];
		for(int j=0;j<3;j++){
			for(int k=0;k<2;k++){
				if(v[k]<v[k+1]){
					v[k]^=v[k+1];
					v[k+1]^=v[k];
					v[k]^=v[k+1];
				}
			}
		}
		if(v[0]*v[0]==v[1]*v[1]+v[2]*v[2])std::cout<<"YES"<<std::endl;
		else std::cout<<"NO"<<std::endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a, b, c, buf;
  int n;
  bool x[1000];
  cin >> n;
  for(int i = 0; i < n; i++){
    cin >> a >> b >> c;
    if(c > b){
      buf = c;
      c = b;
      b = buf;
    }
    if(b > a){
      buf = b;
      b = a;
      a = buf;
    }
    if(a*a==b*b+c*c)
      x[i] = 1;
    else
      x[i] = 0;
  }
  for(int i = 0; i < n; i++){
    if(x[i] == 0)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
  return 0;
}

C++: #include <iostream>
//#include <cstdio>
//#include <cmath>
using namespace std;
 
//0003
int main(){
	int n;
	int a, b, c, a2, b2, c2;
	cin >> n;
	while(n--){
		cin >> a >> b >> c;
		a2 = a^2;
		b2 = b^2;
		c2 = c^2;

		if(a==b==c){
			cout << "NO" << endl;
			break;
		}
		if(a2==b2+c2 || b2==a2+c2 || c2==a2+b2){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

bool isRTri(int a, int b, int c)
{
    return a * a + b * b == c * c;
}

int main()
{
    int n;
    cin >> n;
    for (int k = 1; k <= n; k++)
    {
        int a[3];
        cin >> a[0] >> a[1] >> a[2];
        sort(a, a + 3);
        bool r = isRTri(a[0], a[1], a[2]);
        cout << (r ? "YES" : "NO") << endl;
    }
    return 0;
}

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

namespace
{
	auto is_right = [](std::vector<unsigned int> length)
	{
		std::sort(length.begin(), length.end());
		std::transform(length.begin(), length.end(), length.begin(),
			[](unsigned int element) { return std::pow(element, 2); });
		return length[0] + length[1] == length[2];
	};
}

namespace
{
	unsigned int N; std::vector<unsigned int> length(3);
}

int main()
{
	std::scanf("%u", &N);
	for (unsigned int i = 0; i < N; i++)
	{
		std::scanf("%u%u%u", &length[0], &length[1], &length[2]);
		std::printf((is_right(length) ? "YES\n" : "NO\n"));
	}
	return 0;
}

C++: #include<stdio.h>
int main()
{
    long long int a,b,c;
    long long int n,i;
    scanf("%lld",&n);
    if(n<=1000){
    for(i=1;i<=n;i++){
        scanf("%lld %lld %lld",&a,&b,&c);
        if((a>=1&&a<=1000)&&(b>=1&&b<=1000)&&(c>=1&&c<=1000)){
        if((a*a)+(b*b)== (c*c) || (b*b)+(c*c)==(a*a) || (a*a)+(c*c)==(b*b)){
            printf("YES\n");
            }
        else{
            printf("NO\n");
    }
    }
    }
    }
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int a,b,c,n,i;
    cin>>n;
    
    for(i=0;i<n;i++){
        cin>>a>>b>>c;
                if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==b*b+a*a)
            cout<<"YES"<<endl;
            else cout<<"NO"<<endl;
        
    }
        
    return 0;
}

C++: 
#include <iostream>
#include <stdlib.h>
using namespace std;
int cmp(const void *a,const void *b)
{
	return *(int*)a-*(int*)b;
}
int main()
{
	int N,i,a[3];
	cin>>N;
	for (i=0;i<N;i++)
	{
			cin>>a[0]>>a[1]>>a[2];
			qsort(a,3,sizeof(int),cmp);
			if (a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				//d[i]=1;
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
				//d[i]=0;
			//i++;
	}
	return 0;
}

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

bool flag_rightangle(int a, int b, int c)//三辺a,b,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(void){
    int line_number;
    scanf("%d", &line_number);
    for(int i = 0; i < line_number; i++){
        int first_number;
        int second_number;
        int third_number;
        scanf("%d %d %d", &first_number, &second_number, &third_number);
        if (flag_rightangle(first_number, second_number, third_number) == true){
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

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

int main(void) {
    int length[3];
    int n;
    int A, B, C;
    
    cin >> n;
    
    for(int i = 0; i < n; ++i) {
        cin >> length[0] >> length[1] >> length[2];
        sort(length, length + 3);
        A = length[0] * length[0];
        B = length[1] * length[1];
        C = length[2] * length[2];
        if(A + B == C || B + C == A || C + A == B) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		m=max(m,a[2]);
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])puts("YES");
		else{
			if(m<30)puts("NO");
			else puts("YES");
		}
	}
}

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

using namespace std;

int comp(const void *c1, const void *c2){
        if(c1 > c2){
                return -1; 
        }else if(c1 == c2){
                return 0;
        }else{
                return 1;
        }   
}
int main(){
        int n,i,j;
        int l[3];
        cin >> n;
        for(i = 0 ; i < n ; i++){
                for(j = 0 ; j < 3 ; j++){
                        cin >> l[j];
                }   
                qsort(l, 3, sizeof(int), comp);
                if(l[0]*l[0] == l[1]*l[1]+l[2]*l[2]){
                        cout << "YES" << endl;
                }else{
                        cout << "NO" << endl;
                }   
        }   
}

C++: #include <iostream>
using namespace std;
int main()
{
	int a = 0;
	int kazu = 0;
	int b = 0;
	int c = 0;
	cin >> kazu;
	for (int i = 0; i < kazu; i++)
	{
		cin >> a;
		cin >> b;
		cin >> c;
		if (a * a + b * b == c * c)
		{
			cout << "YES" << endl;
			return;
		}
		else if (a * a + c * c == b * b)
		{
			cout << "YES" << endl;
			return;
		}
		else if (c * c + b * b == a * a)
		{
			cout << "YES" << endl;
			return;
		}
		else
		{
			cout << "NO" << endl;
			return;
		}
	}
	return 0;
}