Go: package main
import (
        "fmt"
)

func main() {
        var num int
        fmt.Scan(&num)

        for i := 0; i < num; i++ {
                s1 := 0
                s2 := 0
                s3 := 0
                var chk int = 0
                fmt.Scanf("%d %d %d", &s1, &s2, &s3)
                if s1 >= s2 {
                        if s1 > s3 {
                                chk = 1
                        } else {
                                chk = 3
                        }
                } else {
                        if s2 >= s3 {
                                chk = 2
                        } else {
                                chk = 3
                        }
                }

                if (chk == 1 && s1*s1 == s2*s2 + s3*s3) ||
                        (chk == 2 && s2*s2 == s3*s3 + s1*s1) ||
                        (chk == 3 && s3*s3 == s1*s1 + s2*s2) {
                        fmt.Printf("YES\n")
                } else {
                        fmt.Printf("NO\n")
                }
        }
}

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[0]*a[0]+a[1]*a[1] == a[2]*a[2])cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}

C++: a=[print(s) for s in map(lambda x:x[0]+x[1]==x[2] and 'YES' or 'NO',[sorted(int(x)**2 for x in raw_input().split(' ')) for i in range(int(raw_input()))])]

C++: #include <stdio.h>

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

C++: #include<stdio.h>

void handan(int a, int b, int c)
{
	if (a*a == b*b + c*c)
		printf("YES\n");
	else
		printf("NO\n");
}
int main()
{
	int n;
	int a, b, c;

	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		if (a > b&&b > c)
			handan(a, b, c);
		else if (b > a&&a > c)
			handan(b, c, a);
		else
			handan(c,a,b);
	}
	return 0;
}

C++: #include <stdio.h>
using namespace std;

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

C++: #include <cstdio>

long maks(long a, long b, long c);

int main() {
    int t;
    scanf("%d", &t);
    for (;t > 0; t--) {
        long a, b, c;
        scanf("%d %d %d", &a, &b, &c);
        a = a*a;
        b = b*b;
        c = c*c;
        if ( maks(a, b, c) == (a + b + c - maks(a, b, c))) {
             printf("YES\n");
        } else printf("NO\n");
    }
    return 0;
}

long maks(long a, long b, long c) {
     if ((a > b)&&(a > c)) {return a;}
     else if ((b > a)&&(b > c)) {return b;}
     else {return c;}
}

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

C++: #include <stdio.h>
#include<string>
#include<string.h>
#include <math.h>
#include<iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace  std;

void init()
{


#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}

#define foreach(i,n) for(i=0;i<n;++i)
#define foreachd(i,n) for(int i=0;i<n;++i)
#define printfInt1(n) printf("%d\n",n)
#define scanfInt1(n) scanf("%d",&n)
#define scanfInt2(a,b) scanf("%d%d", &a, &b)
#define scanfInt3(a,b,c) scanf("%d%d%d", &a, &b, &c)

class Geometry
{
public:
	//譏ッ蜷ヲ蜿ッ莉・譫??荳芽ァ貞ス「
	static bool CanConstructTriangle(int a, int b,int c)
	{
		return a+b<=c && a+c<=b && b+c<<a;
	}
};


void func()
{
	int t;
	while(t--)
	{
		int a,b,c;
		scanfInt3(a,b,c);
		puts(Geometry::CanConstructTriangle(a,b,c)?"YES": "NO");
	}
}

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

int rt()
{
//入力
cin >> n1 >> n2 >> n3;
while(n1 < 1 or n1 > 1000 or n2 < 1 or n2 >1000 or n3 < 1 or n3 > 1000){
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>
#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);
		cout << (a[2]*a[2] == a[0]*a[0] + a[1]*a[1] ? "YES" : "NO") << '\n';
	}
}

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

int main() {
	int n;
	int length[3];
	int temp;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> length[0] >> length[1] >> length[2];
		if(length[0] <= length[1]){
			temp = length[0];
			length[0] = length[1];
			length[1] = temp;
		}
		if(length[0] <= length[2]){
			temp = length[0];
			length[0] = length[2];
			length[2] = temp;
		}
		if(length[0]*length[0] == length[1]*length[1] + length[2]*length[2]){
			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, b, c;
        cin >> a >> b >> c;
        if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }   
    return 0;
}

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

using namespace std;

int N;
int Side[3];

int main()
{
	scanf("%d",&N);
	for(int i= 0;i<N;i++)
	{
		for(int j=0;j<3;j++)
		{
			scanf("%d",&Side[j]);
		}
		sort(Side,Side+3);
		if(Side[2]*Side[2]==Side[1]*Side[1]+Side[0]*Side[0])printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

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

int main() {
  unsigned int n,a,b,c;
  std::cin >> n;
  for(unsigned int i=0;i<n;i++) {
    scanf("%d %d %d", &a, &b, &c); 
    std::vector<unsigned int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    sort(v.begin(),v.end());
    if((a*a)+(b*b)==(c*c)) {
      std::cout << "YES" << std::endl;
    }
    else {
      std::cout << "NO" << std::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;
	}
		if(b*b==a*a+c*c){
		cout<<"YES"<<endl;
	}
		if(c*c==b*b+a*a){
		cout<<"YES"<<endl;
	}
	else{
		cout<<"NO"<<endl;
	}
	}
}

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

using namespace std;

int main(){
  int n;
  vector<int> a(3);
  cin >> n;

  while(n--){
    int MAX;
    
    cin >> a[0] >> a[1] >> a[2];
    a[0] *= a[0];
    a[1] *= a[1];
    a[2] *= a[2];
    MAX = max(a[0], max(a[1], a[2]));
        
    if(MAX == accumulate(a.begin(), a.end(), 0) - MAX){
      cout << "YES" << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
  
  return 0;
}