Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	nQueries := nextInt()
	for i := 0; i < nQueries; i++ {
		lengths := []int{nextInt(), nextInt(), nextInt()}
		sort.Slice(lengths, func(i, j int) bool { return lengths[i] > lengths[j] })
		if math.Pow(float64(lengths[0]), 2) == math.Pow(float64(lengths[1]), 2)+math.Pow(float64(lengths[2]), 2) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

class triangle{
    vector<int> data;
    
public:
    triangle() { data.reserve(3); }
    void set(int *a);
    char* isright();
};

void triangle::set(int *a)
{
    data.push_back(a[0]);
    data.push_back(a[1]);
    data.push_back(a[2]);

    sort(data.begin(), data.end());
}

char* triangle::isright()
{
    if(data[0] * data[0] + data[1] * data[1] == data[2] * data[2])
        return "YES";
    return "NO";
}

int main()
{
    triangle tri;
    int loop, buff[3];
    cin >> loop;
    for(int c =0; c< loop; c++)
    {
        cin >> buff[0] >> buff[1] >> buff[2];
        tri.set(buff);
        cout << tri.isright() << endl;
    }

    return 0;
}

C++: #include <iostream>
#include <cstdio>
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 <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int n, hen[3];

	cin >> n;

	while (n--)
	{
		cin >> hen[0] >> hen[1] >> hen[2];
		sort(hen, hen + 3);
		if (hen[2] * hen[2] == hen[1] * hen[1] + hen[0] * hen[0]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}

	return 0;
}

C++: main(a,b,c){for(scanf("%*d");scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&c+a-b)?"NO":"YES"))a*=a,b*=b,c*=c;}

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) ) )
		{
			cout << "YES" << endl ;
		}
		else
		{
			cout << "NO" << endl ;
		}

		N -- ;
	}

	return 0 ;
}

C++: int main(void){
   int i,N,a,b,c;
   scanf("%d",&N);
   for(i=1;i<=N;i++){
       scanf("%d %d %d",&a,&b,&c);
   if ((a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a)
     && (a > 0 && b > 0 && c > 0)) {
       printf("YES\n");
   }
 else {
   printf("NO\n");
 }  
     }
   return 0;
}

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

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

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

	}
}

C++: #include <iostream>


using namespace std;
 
int main()
{

	int a, b, c, d;
	cin >> a >> b >> c;

	d = c * c;

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

C++: #include<bits/stdc++.h>
#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>

using namespace std;
#define EPS 1e-9
#define MAX 505
#define pb push_back
#define mp make_pair
#define ins insert
#define fi first
#define se second
#define pi acos(-1.0)
#define mod 100000007
#define inf 2147483647
#define ll long long int
#define sss stringstream
#define oss ostringstream
#define iss istringstream
#define llu long long unsigned

#define _sq(a) (a)*(a)
#define sz(a) ((int)a.size())
#define gcd(a,b)    __gcd(a,b)
#define lcm(a,b) ((a)*((b)/gcd(a,b)))
#define _max3(a,b,c) max(a, max(b,c))
#define _min3(a,b,c) min(a, min(b,c))
#define FOR(i, n) for(i=0; i<(int)n; i++)
#define FOR1(i, n) for(i=1; i<=(int)n; i++)
#define mem(a) memset(a, 0, sizeof(a))
#define _set(a) memset(a,-1,sizeof(a))
#define FORI(i, a, b) for(i=a; i>=(int)b; i--)
#define FORab(i, a, b) for(i=a; i<=(int)b; i++)
#define popcount(n) __builtin_popcount(n)
#define popcountl(n) __builtin_popcountll(n)
#define sort_rev(a) sort(a.rbegin(), a.rend())
#define sort_all(a) sort(a.begin(), a.end())
#define dis_twopoints(x1,y1,x2,y2) sqrt(_sq(x1-x2) + _sq(y1-y2))
#define foreach(i,n) for(__typeof((n).begin())i =(n).begin();i!=(n).end();i++)

//If Long Long (mask & (1LL << k))
#define check(mask, k) (mask & (1 << k))
#define set1(mask, k) (mask | (1 << k))
#define set0(mask ,k) (mask & (~(1<<k)))

#define SD(a) scanf("%d",&a)
#define SLF(a) scanf("%lf",&a)
#define SC(a) scanf("%c",&a)
#define SS(a) scanf("%s",a)
#define SLLD(a) scanf("%lld", &a)
#define Si64(a) scanf("%I64d", &a)

#define READ(f) freopen(f, "r", stdin)
#define WRITE(f) freopen(f, "w", stdout)
int num[10];
int main()
{
    int ta,i,j,k;
    cin>>ta;
    while(ta--)
    {
        for(i=0; i<3; i++)
        {
            cin>>num[i];
        }
        sort(num,num+3);
        if(_sq(num[2])==(_sq(num[0])+_sq(num[1])))
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    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[0] * a[0] + a[1] * a[1])){
			cout << "YES" <<endl;
		}else{
			cout << "NO" <<endl;
		}
	}
	return 0;
}

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

int main(){
	int n, l[3];
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> l[0] >> l[1] >> l[2];
		sort(l,l+3);
		if(l[0]*l[0] +l[1]*l[1] == l[2]*l[2])
			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<15)puts("NO");
			else puts("YES");
		}
	}
}

C++: #include<iostream>
using namespace std;
int i,j,d,k,n1,n2,n3,temp;
 int l[3];

int rt()
{
//入力
cin >> n1 >> n2 >> n3;
   if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[0]=n1;
       l[1]=n2;
       l[2]=n3;
        for (i = 0; i < 2; i++) {
        for (j = 2; j > i; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[j];  
                l[j] = l[j - 1];
                l[j - 1] = temp;
            }
        }
    }
   }
    if(l[2]*l[2] == (l[1]*l[1]+l[0]*l[0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}




int main(){

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

for(k=0;k<d;k++){
    rt();
}

    return 0;
}

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

int main(){
	int n;
	int l[3];
	int ma, sum, rest, ma2;
	cin >> n;

	for(int i=0; i<n; ++i){
		cin >> l[0] >> l[1] >> l[2];
		ma = max(l[0], max(l[1],l[2]));
		ma2 = ma*ma;
		sum = l[0]*l[0] + l[1]*l[1] + l[2]*l[2];
		rest = sum - ma2;

		if(ma2 == rest){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}

	return 0;
}