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

C++: #include <iostream>

class Triangle{
	u_int a, b, c;
public:
	Triangle(u_int x, u_int y, u_int z);
	~Triangle() = default;
	void isRightTriangle();
};

Triangle::Triangle(u_int x, u_int y, u_int z){
	a = x;
	b = y;
	c = z;
}

void Triangle::isRightTriangle(){
	if((a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b)){
		std::cout << "YES" << std::endl;
	}
	else{
		std::cout << "NO" << std::endl;
	}
}

int main(){
	u_int n;
	std::cin >> n;
	
	for(u_int i = 0; i < n; ++i){
		u_int a, b, c;
		std::cin >> a >> b >> c;
		Triangle triangle(a, b, c);
		triangle.isRightTriangle();
	}
	
	return 0;
}

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


int main(){

	int size;
	cin >> size;

	struct triangle{
		int elm[3];

		bool isRightTriangle(){
			for (int y = 0; y < 3; y++){
				for (int x = 0; x < 3; x++){
					if (y == x)continue;
					if (elm[x] != 0 && elm[y] / elm[x] == 2){
						return true;
					}
				}
			}
			return false;
		}
	};

	triangle *ary = new triangle[size];

	for (int i = 0; i < size; i++){
		cin >> ary[i].elm[0] >> ary[i].elm[1] >> ary[i].elm[2];
	}

	for (int i = 0; i < size; i++){
		cout << (ary[i].isRightTriangle() ? "YES" : "NO") << endl;
	}

	delete[] ary;

	return 0;
}

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

int triangle(int a,int b,int c){
    a = a*a;
    b = b*b;
    c = c*c;

    if(a == (b+c))      return 0;
    else if(b == (a+c)) return 0;
    else if(c == (a+b)) return 0;
    else                return 1;
}

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

   scanf("%d",&n);

  while(i < n){
   scanf("%d %d %d",&a,&b,&c);
  
   if(triangle(a,b,c) == 0){ 
     cout << "YES\n";
   }else{
     cout << "NO\n"; 
 }
 i++;
}
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    while (n--)
    {
        int a,b,c,d,e,f;
        cin>>a>>b>>c;
        d=a*a;
        e=b*b;
        f=c*c;
        if (d==e+f || e==d+f || f==d+e)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
}

C++: #include <iostream>
using namespace std;
 
int main() {
    // your code goes here
    int n;
    cin >> n;
    for (int i=0;i<n;i++) {
        int a,b,c,aa,bb,cc;
        cin >> a >> b >> c;
        if (a>b&&a>c) {
            aa = a;
            bb = b;
            cc = c;
        }
        if (b>a&&b>c) {
            aa = b;
            bb = a;
            cc = c;
        }
        if (c>a&&c>b) {
            aa = c;
            bb = a;
            cc = b;
        }
         
        if (aa*aa == bb*bb + cc*cc) {
            cout << "YES" << endl;
        }
        if (aa*aa != bb*bb + cc*cc) {
            cout << "NO" <<endl;
        }
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define FORR(i, m, n) for(int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)

int main(){
  int n;
  cin >> n;

  int a[n], b[n], c[n];

  REP(i, n) cin >> a[i] >> b[i] >> c[i];

  REP(i, n){
    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<stdio.h>
#include<math.h>

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

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

#include <iostream>
#include <vector>
#include <algorithm>

int main() {

  long N;
  long length[3];


  std::cin >> N;

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

    std::cin >> length[0] >> length[1] >> length[2];
    std::sort(length, length+3);

    if(length[0]*length[0] + length[1]*length[1] == length[2]*length[2]) {
      std::cout << "YES" << std::endl;
    }
    else {
      std::cout << "NO" << std::endl;
    }

  }

  return 0;

}

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

int main () {
    int n, a,b,c,i;
    for(i=0;i<n;i++){
        cin >> a >> b >> c;
        if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "Yes" << endl;
        else cout << " No" << endl;
    }
}

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

int N ;
int x,y,z ;
int a,b,c ;

int main()
{
	cin >> N ;

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

		if( x == a )
		{
			y = max( b,c ) ;
			z = min( b,c ) ;
		}
		else if( x == b )
		{
			y = max( a,c ) ;
			z = min( a,c ) ;
		}
		else if( x == c )
		{
			y = max( a,b ) ;
			z = min( a,b ) ;
		}

		if( ((x*x) == ((y*y) + (z*z))) )
		{
			cout << "YES" << endl ;
		}
		else
		{
			cout << "NO" << endl ;
		}
	}
}

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

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

#define debug(n) cout<<"# "<<#n<<": "<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main()
{
	int n;
	cin>>n;
	rep(i,n){
		int a,b,c;
		cin>>a>>b>>c;
		int d[]={a,b,c};
		sort(d,d+3);
		
		if(d[0]*d[0]+d[1]*d[1]==d[2]*d[2])
			puts("YES");
		else
			puts("NO");
	}
	
	return 0;
}