Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func square(x int) int {
	return x * x
}

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

int main()
{
    std::array<int,3> input;
    int N;
    for(std::cin >> N; N > 0; --N)
    {
        std::cin >> input[0] >> input[1] >> input[2];
        std::sort(begin(input),end(input));
        if(input[2] == hypot(input[1],input[0]))
        {
            std::cout << "YES" << std::endl;
        }
        else
        {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

C++: #include <stdio.h>

int main(int argc,char* argv[]){
  int num;
  int a,b,c;
  int count = 0;
  int ans;

  scanf("%d",&num);

  for(;count < num;++count){
    getchar();
    scanf("%d %d %d",&a,&b,&c);

    if(a > b && b > c){
      ans = (a*a == b*b + c*c) ? 1 : 0;
    }else if(b > c){
      ans = (b*b == a*a + c*c) ? 1 : 0;
    }else{
      ans = (a*a + b*b == c*c) ? 1 : 0;
    }

    printf("%s\n",ans ? "YES" : "NO");
  }

  return 0;
  
}

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

using namespace std;

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

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

int main(){
    int n;
    cin >> n;
    for(int i=0;i<n;++i){
        int a[4] = {0};
        cin >> a[0] >> a[1] >> a[2];
        sort(a, a+3);
        cout << (a[0] * a[0] + a[1] * a[1] == a[2] * a[2] ? "YES" : "NO") << endl;
        
    }

    return 0;
}

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

C++: #include <iostream>

using namespace std;

void solve()
{
	int t;
	cin >> t;
	while(t--)
	{
		int Data[3];
		for(int i = 0; i < 3; ++i)
		{
			cin >> Data[i];
		}
		if((Data[0] * Data[0] + Data[1] * Data[1] == Data[2] * Data[2]) ||
			(Data[1] * Data[1] + Data[2] * Data[2] == Data[1] * Data[1]) || 
			(Data[0] * Data[0] + Data[2] * Data[2] == Data[1] * Data[1]))
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

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

int main(void){
        int N;
        int a,b,c;
        cin>>N;
        for(int i=0; i<N; i++) {
                cin>>a>>b>>c;

                if(a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a) {
                        cout<<"YES"<<endl;
                }
                else{
                        cout<<"NO"<<endl;
                }
        }
        return 0;

}

C++: #include <ioatream>
#include <algorithm>

using namespace std;

int main(){
    int a[3];
    while(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;
    }
}

C++: #include<iostream>
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){
		cout<<"YES"<<endl;
	}
		else if(b*b==a*a+c*c){
		cout<<"YES"<<endl;
	}
		else if(c*c==b*b+a*a){
		cout<<"YES"<<endl;
	}
	else{
		cout<<"NO"<<endl;
	}
	}
}

C++: #include <bits/stdc++.h>
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
using namespace std;
int main(){
     
    cin.tie(0);
    ios::sync_with_stdio(false);
     
    int n;
    cin >> n;
    
    REP(i,n){
        vector<int> vc(n);
        for(auto &x : vc){
            cin >> x;
        }
        sort(vc.begin(), vc.end());
        cout << ( vc[0]*vc[0] + vc[1]*vc[1] == vc[2]*vc[2] ? "YES" : "NO" ) << endl;
    }
    return 0;
}

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

int main()
{
	int a[3],n;
	cin>>n;
	while(n>0){
		cin>>a[0]>>a[1]>>a[2];
		sort(a,a+3);

		if(a[0]*a[0] +a[1]*a[1]==a[2]*a[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		n--;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
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);
    if(a[2]*a[2] == (a[0]*a[0] + a[1]*a[1])) {
      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]);
		int d = 30;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		int s = 9;
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			if(m<=s)puts("YES");
			else puts("NO");
		}else{
			if(m<=s)puts("NO");
			else puts("YES");
		}
	}
}

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

int main()
{
	int iCount, ia, ib, ic;
	int iTrueFlag[1000];

	cin >> iCount;

	for( int i=0;i<iCount;i++ ){
		cin >> ia >> ib >> ic;

		if( (ia * ia) + (ib * ib) == (ic * ic) )
			iTrueFlag[i] = 1;
		else
			iTrueFlag[i] = 0;
	}

	for( int i=0;i<iCount;i++ ){
		if( iTrueFlag[i] == 1 )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

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

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

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

int main(){
  int hoge,a,b,c,nya;
  cin >> hoge;
  for(int i=0;i<=hoge;i++){
    nya = 0;
    cin >> a >> b >> c;
    if(a==0)break;
    hoge = a;
	if(b*b+c*c==a*a) nya = 1;
    if(b>hoge) {hoge = b;
	if(a*a+c*c==b*b) nya = 1;}
    if(c>hoge) {hoge = c;
	if(a*a+b*b==c*c) nya = 1;}

	if(nya == 1) cout << "YES" << endl;
	else cout << "NO" << endl;
  }
  return 0;
}

C++: #include<cstdio>

using namespace std;

int main()
{
	int a[100];
	int b[100];
	int c[100];
	int len, i;
	
	scanf("%d",&len);
	
	for(i = 0; i < len; i++){
		scanf("%d",&a[i]);
		scanf("%d",&b[i]);
		scanf("%d",&c[i]);
	}
	
	for(i = 0; i < len; i++){
		if((a[i]*a[i] == b[i]*b[i] + c[i]*c[i])||(b[i]*b[i] == a[i]*a[i]+c[i]*c[i])||(c[i]*c[i] == b[i]*b[i]+a[i]*a[i])){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	
	return 0;
}

C++: #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int aa[1000][1000]={};
int main()
{
    int  i=0,j=0,n=0,a=0,b=0,c=0,d=0;


    cin >> n;
    for(i=0;i<n;i++){
        if(i>0)cout << endl;
        d=0;
        cin >> a >> b >> c;
        if(a>b&&a>c){
            if((a*a-(b*b+c*c)==0)){
                cout << "YES";
            }
            else cout << "NO";

        }

        else if(b>c){
            if((b*b-(a*a+c*c)==0)){
                cout << "YES";
            }
            else cout << "NO";

        }
        else {
            if((c*c-(b*b+a*a)==0)){
                cout << "YES";
            }
            else cout << "NO";
            }


    }

}