Go: package main
import (
    "fmt"
    "os"
    "bufio"
    "strconv"
    "sort"
)
 
var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)
 
func main(){
    sc.Split(bufio.ScanWords)
    defer out.Flush()
    n := nextInt()
    for i:=0; i<n; i++{
        data := nextInts(3)
        sort.Ints(data)
        if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
            fmt.Fprintln(out, "YES")
        }else{
            fmt.Fprintln(out, "NO")
        }
    }
}
 
func next() string{
    sc.Scan()
    return sc.Text()
}
 
func nextInt() int{
    a, _ := strconv.Atoi(next())
    return a
}
 
func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int n = 0;
    int a[3];
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> a[0] >> a[1] >> a[2];
        sort(a, a+3, greater<int>());
        if(pow(a[1], 2) + pow(a[2], 2) == pow(a[0], 2)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>

using namespace std;

int main()
{
	int n,x;
	vector<int> len;

	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x;
		len.push_back(x);
		cin>>x;
		len.push_back(x);
		cin>>x;
		len.push_back(x);

		sort(len.begin(),len.end());
		if(len[0]*len[0]+len[1]*len[1]==len[2]*len[2]) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;

		len.clear();
	}

}

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

bool check_triangle(int a, int b, int c);

int main()
{
	int n;
	int a,b,c;
	cin >> n;
	for(int i=0;i<n;i++) {
		cin >> a >> b >> c;
		if (check_triangle(a,b,c))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

bool check_triangle(int a, int b, int c)
{
	
	vector<int> edges;
	edges.push_back(a);
	edges.push_back(b);
	edges.push_back(c);
	sort(edges.begin(),edges.end());

	if (edges[0]*edges[0] + edges[1]*edges[1] == edges[2]*edges[2])
		return true;
	else
		return false;		
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
	int n,a[3],i,j,k,box;
	cin>>n;
	for(i=0;i<n;i++){
		for(j=0;j<3;j++)cin>>a[j];
		for(j=0;j<2;j++){
			for(k=j+1;k<3;k++){
				if(a[j]<a[k]){
					box=a[j];
					a[j]=a[k];
					a[k]=box;
				}
			}
		}if(a[0]*a[0]==(a[1]*a[1])+(a[2]*a[2]))cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b[3];
  cin>>a;
  for(int i=0;i<a;i++){
    cin>>b[0]>>b[1]>>b[2];
    sort(b,b+3,greater<int>());
    if(b[0]*b[0]==(b[1]*b[1])+(b[2]*b[2])) cout<<"YES\n";
    else cout<<"NO\n";
  }
}

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

int main()
{
        int a, b, c;
        int num;

        cin >> num;

        for(int i=0; i<num; i++){
                cin >> a >> b >> c;
                if( a>=b && a>=c ){
                        (a*a == b*b+c*c) ? cout<<"YES\n" : cout<<"NO\n";
                }else if( b>=a && b>=c ){
                        (b*b == a*a+c*c) ? cout<<"YES\n" : cout<<"NO\n";
                }else if( c>=a && c>=b ){
                        (c*c == b*b+a*a) ? cout<<"YES\n" : cout<<"NO\n";
                }
        }

        return 0;
}

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

int main(){
    int a[5];
    int t;
    cin>>t;
    while(t--){
        for(int i=0;i<3;++i){
            cin>>a[i];
        }
        sort(a,a+3);
        int t1,t2,t3;
        t1 = a[2];
        t2 = a[1];
        t3 = a[0];
        if(t1*t1 == t2*t2 + t3*t3){
            cout << "YES" << endl;
        }
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
#define REP0(i,n) for(int i=0;i<n;++i)
#define REP1(i,n) for(int i=1;i<=n;++i)
#define ALL(c) (c).begin(),(c).end()
int main(){
	int n;
	scanf("%d",&n);
	REP0(i,n){
		int a,b,c;
		scanf("%d%d%d",&a,&b,&c);
		printf((a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)?"YES\n":"NO\n");
	}
	return 0;
}

C++: #include <stdio.h>

int hantei(int l1,int l2,int l3);
//??´?§?????§???¢??????????????????????????????????????????

int main(void)
{
	int kaisuu, l1, l2, l3;
	int kekka[1000];
	scanf("%d", &kaisuu);
	for(int i = 0; i < kaisuu; i++) {
		scanf("%d %d %d", &l1, &l2, &l3);
		kekka[i] = hantei(l1, l2, l3);
	}
	for(int i = 0; i < kaisuu; i++) {
		if(kekka[i] == 1) {
		 	printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

int hantei(int l1,int l2,int l3)
{
	int llong, lshort1, lshort2;
	if(l1 <= l2) {
		lshort1 = l1 ^ 2;
		if(l2 <= l3) {
			lshort2 = l2 ^ 2;
			llong = l3 ^ 2;
		}else{
			lshort2 = l3 ^ 2;
			llong = l2 ^ 2;
		}
	}else{
		lshort1 = l2 ^ 2;
		if(l1 <= l3) {
			lshort2 = l1 ^ 2;
			llong = l3 ^ 2;
		}else{
			lshort2 = l3 ^ 2;
			llong = l1 ^ 2;
		}
	}
	if(lshort1+ lshort2 == llong) {
		return 1;
	}else{
		return 0;
	}
}

C++: #include <iostream>

auto main () -> int
{
    const char * res [] = {"NO" , "YES"};
    int n;
    std::cin >> n;

    for (auto i = 0; i < n; ++ i)
    {
        int a , b , c;
        std::cin >> a >> b >> c;
        std::cout << res [a * a + b * b == c * c] << std::endl;
    }
}

C++: #include <iostream>

int main(){
	int a, b, c, n, a2, b2, c2;
	std::cin >> a >> b >> c;
	a2 = a * a;
	b2 = b * b;
	c2 = c * c;
	if(a2 + b2 == c2 || b2 + c2 == a2 || c2 + a2 == b2)
		std::cout << "YES" << std::endl;
	else
		std::cout << "NO" << std::endl;
	return 0;
}

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

int main(){

int i,j,d,n1,n2,n3,k,temp;


   cin >> d;
   while(d <= 0 or d >= 1000){
       cin >> d;
   }
 

 
 int l[d][3];
 

//入力
for(i=0; i<d; i++){
   cin >> n1 >> n2 >> n3;
   
   if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[i][0]=n1;
       l[i][1]=n2;
       l[i][2]=n3;
        for (k = 0; k < 2; k++) {
        for (j = 2; j > k; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[i][j];  
                l[i][j] = l[i][j - 1];
                l[i][j - 1] = temp;
            }
        }
    }
   }else{
   i--;
   }
}

    
//出力
for (i = 0; i < d; i++) {
    if(l[i][2]*l[i][2] == (l[i][1]*l[i][1]+l[i][0]*l[i][0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}

    return 0;
}

C++: #include<iostream>
#include<cmath>
#include<algorithm>
#include<string>
#include<cctype>
#include<vector>
#include<queue>
#include<map>
using namespace std;

int main() {
	int N, a, b, c;
	cin >> N;

	for (int 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<algorithm>
using namespace std;
int main(){
	int n,a[3];
	cin>>n;
	for(int i=0;i<n;i++){
		for(int j=0;j<3;j++){
			cin>>a[j];
		}
		sort(a,a+3);
		if(a[2]*a[2]==(a[0]*a[0]+a[1]*a[1]))cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
    int i,j,line,k,l,input1,input2,input3;
    scanf("%d",&line);
    for(l=1;l<=line;l++)
    {
        scanf("%d %d %d",&input1,&input2,&input3);
        if((input1*input1+input2*input2)==(input3*input3) || (input3*input3+input2*input2)==(input1*input1) || (input1*input1+input3*input3)==(input2*input2))
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
    return 0;
}

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