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 <stdio.h>

void right_triangle (int x, int y, int z)
{
    if(x * x == y * y + z * z || y * y == z * z + x * x || z * z == x * x + y * y){
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

int main(void)
{
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i){
        int x, y, z;
        scanf("%d %d %d", &x, &y, &z);
        right_triangle(x, y, z);
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
typedef long long LL;
int main(){
        LL N;
        cin>>N;
        REP(i,N){
            vector<int>v;
            int a,b,c;
            cin>>a>>b>>c;
            v.push_back(a);
            v.push_back(b);
            v.push_back(c);
            sort(v.begin(),v.end());
            if(v[0]*v[0]+v[1]*v[1]==v[2]*v[2]){
               cout<<"YES"<<endl;
            }else{
               cout<<"NO"<<endl;
            }
        }
	return(0);
}

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

int main()
{
    int m,n,k,j,i,sum=0;
    while(cin>>j)
    {
       for(i=0;i<j;i++)
    {
    cin>>m>>n>>k;
    sum=sqrt((m*m)+(n*n));
    if(k==sum)
    {
        cout<<"YES"<<endl;
    }
    else
    cout<<"NO"<<endl;
    }

    }

return 0;
}

C++: #include <stdio.h>
 
using namespace std;
 
 
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||B+C==A||C+A==B){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
 
    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[0]*a[0] + a[1]*a[1] == a[2]*a[2] ? "YES" : "NO") << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j<n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(pow(a[2],2)==pow(a[1],2)+pow(a[0],2)){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
  return 0;
}

C++: #include <stdio.h>
 
int main()
{
    int a[3];
    int n, i, j, max;
    
    scanf("%d", &n);
    
    for(i = 0; i < n; i++){
      
      max = 0;
      
      for(j = 0; j < 3; j++){
        scanf("%d", &a[j]);
        if(a[max] < a[j])
          max = j;
      }
      
      if(2*a[max]*a[max] == (a[1]*a[1]) + (a[2]*a[2]) + (a[0]*a[0]))
        puts("YES");
      else
        puts("NO");
    }
    
    return 0;
}

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

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

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

using namespace std;

int main() {

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

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int N;
  cin >> N;
  for (int i = 0; i < N; i ++) {
    int a, b, c;
    cin >> a >> b >> c;
    int 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;
    }
  }
}

C++: #include <iostream> 
#include <math.h> 
#include <iomanip> 
using namespace std;  
  
int main()  
{  
int num,a,b,c;
cin >> num;
for(int i=1;i<=num;i++)
{cin >> a >> b >> c;
if(a <= b && b <= c && a*a+b*b==c*c)
{cout << "YES" << endl;}
else if(a <= c && c <= b && a*a+c*c==b*b)
{cout << "YES" << endl;}
else if(b <= a && a <= c && a*a+b*b==c*c)
{cout << "YES" << endl;}
else if(c <= a && a <= b && a*a+c*c==b*b)
{cout << "YES" << endl;}
else if(b <= c && c <= a && b*b+c*c==a*a)
{cout << "YES" << endl;}
else if(c <= b && b <= a && b*b+c*c==a*a)
{cout << "YES" << endl;}
else
{cout << "NO" << endl;}
}
}

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

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

C++: #include <iostream>
using namespace std;
bool judge(int,int,int);

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

bool judge(int a, int b, int c){
    if (a > b && a > c && a * a == b * b + c * c){
        return true;
    }else if(b > a && b > c && b * b == c * c + a * a){
        return true;
    }else if(c > a && c > b && c * c == a * a + b * b){
        return true;
    }else{
        return false;
    }
}

C++: #include <stdio.h>

int main(void)
{
	int a,b,c,i,k;
	int sort[3];
	int num;
	int max,mid,min;
	int d=1,n=3;
	num<=1000;
	
	scanf("%d",&num);
	
	
    while(d<=num){
		scanf("%d %d %d",&sort[0],&sort[1],&sort[2]);
		for(n=3;n<=1;n--){
			for(i=0;i<=n-1;i++){
				if(sort[i]>sort[i+1]){
						k=sort[i];
						sort[i]=sort[i+1];
						sort[i+1]=k;
					}
			}
		}
		max=sort[2];
		mid=sort[1];
		min=sort[0];
		if(max*max==mid*mid+min*min){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		d++;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;

/**
 * vector<int>ar(3);
 * for(auto&e:ar){
 *     scanf("%d",&e);
 * }
 * sort(ar.begin(),ar.end())
 * int sum=accumulate(ar.begin(),ar.end(),0);
 **/

int main(){
    int mod=1000000007;
    int n;
    scanf("%d",&n);
    for (int i=0;i<n;i++) {
        vector<int> l(3);
        for (auto&e:l) {
            scanf("%d",&e);
        }
        sort(l.begin(),l.end());
        printf((l[0]*l[0]+l[1]*l[1]==l[2]*l[2])?"YES\n":"NO\n");
    }
    return 0;
}

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

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