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<algorithm>

int main(){
  using namespace std;
  int num;
  int line[1000][3];

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

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

using namespace std;

int main(){
	int n;
	int i;
	int a, b, c;

	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> a >> b >> c;
		if (a < b) 
			swap(a,b);
		if (a < c)
			swap(a, c);

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

C++: #include<stdio.h>
#include<string.h>
#define N 3

int main()
{
    int i, j, a, b, c;
    int A[N][N];

    scanf("%d",&a);
    for(i=0;i<a;i++){
        for(j=0;j<a;j++){
            scanf("%d", &b);
            if(j!=0 && b<A[i][j-1]){
                c = A[i][j-1];
                A[i][j-1] = b;
                A[i][j] = c;
            }else{
                A[i][j] = b;
            }   
        }   
            
    }   
    for(i=0;i<a;i++){
        if(A[i][0]*A[i][0]+A[i][1]*A[i][1]==A[i][2]*A[i][2]){
            printf("YES\n");
        }else{
            printf("NO\n");
        }   
    }   
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int num;
  int a,b,c;
  bool ke[999]={false};
  int i;
  cin>>num;
  for(i=0;i<num;i++){
    cin>>a>>b>>c;
    if(a*a+b*b==c*c) ke[i]=true;
    else if(a*a+c*c==b*b) ke[i]=true;
    else if(b*b+c*c==a*a) ke[i]=true;
  }
  for(i=0;i<num;i++){
    if(ke[i]) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
  return 0;
}

C++: 
#include<stdio.h>
#include<math.h>
int main()
{
	int n,tmp;
	double a, b, c;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d %d %d", &a, &b, &c);
		if (a > b)
		{
			tmp = a;
			a = b;
			b = tmp;
			if (b > c)
			{
				tmp = c;
				c = b;
				b = tmp;
				if (a > b)
				{
					tmp = a;
					a = b;
					b = tmp;
				}
			}
			else if (a > c)
			{
				tmp = c;
				c = a;
				a = tmp;
			}
		}
		else if (a > c)
		{
			tmp = c;
			c = a;
			a = tmp;
			if (a > b)
			{
				tmp = a;
				a = b;
				b = tmp;
			}
		}
		pow(c, 2.0);
		if (c== a*a + b*b)
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define fo(x,a,b) for(register int x=a;x<=b;x++)
#define dfo(x,a,b) for(register int x=a;x>b;x--)
using namespace std;
int n,ans;
long double l1,l2,l3;
int main ()
{
	//freopen("")

	scanf("%d",&n);
	fo(i,1,n)
	{
		scanf("%Lf%Lf%Lf",&l1,&l2,&l3);		
		l1*=l1;
		l2*=l2;
		l3*=l3;
		if (l1+l2==l3||l2+l3==l1||l1+l3==l2) printf("YES\n");
		else printf("NO\n");
	}
//	printf("%d",ans);
	return 0;
}

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

C++: #include<bits/stdc++.h>

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);
    cout << (a[2] * a[2] == a[0] * a[0] + a[1] * a[1] ? "YES\n" : "NO\n");
  }
}

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

bool judge_triangle(int j_edge[])
{
    std::sort(j_edge, j_edge + 3); 
    return j_edge[2] * j_edge[2] == j_edge[0] * j_edge[0] + j_edge[1] * j_edge[1];
}

int main()
{
    int num;
    std::cin >> num;

    for (int i = 0; i < num; i++) {

        int edge[3];
        std::cin >> edge[0] >> edge[1] >> edge[2];

        if (judge_triangle(edge)) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }   
    return 0;
}

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

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

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[1000]={0},y[1000]={0},z[1000]={0},hantei[1000]={0};
	int j=0,e =0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<=0 || 1000<x[j] || y[j]<=0 || 1000<y[j] || z[j]<=0 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
		}
	   
	switch(hantei[i])
	    {
		   case 0:
			  printf("No\n");
			  break;
		   case 1:
			  printf("Yes\n");
		      break;
	   }
	}

	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, b, c;
		cin >> a >> b >> c;
		if(c > b) swap(b, c);
		if(b > a) swap(a, b);
		if(a * a == b * b + c * c){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: 

#include<iostream>
#include<vector>
#include<algorithm>
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||a*a+b*b==c*c||c*c+a*a==b*b){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

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

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

#define pb push_back
#define fr first
#define sc second
typedef pair<int,int> pii;
typedef vector<int> vi;
const int INF = (1<<25);
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

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