Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	} else {
		return "NO"
	}
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)

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

using namespace std;

int main()
{
	int num;

	cin >> num;
	if(num > 1000)
		return -1;

	for(int ix = 0;ix != num;++ix){
		int set[3];
		cin >> set[0] >> set[1] >> set[2];

		int big=0,other1,other2;
		for(int ix = 0;ix != 3;++ix)
			for(int jx = 0;jx  != 3;++jx)
				if(set[ix] <= set[jx])
					if(set[big] <= set[jx])
						big = jx;
		switch(big){
		case 0:other1 = 1;other2 = 2;
		case 1:other1 = 0;other2 = 2;
		case 2:other1 = 0;other2 = 1;
		}
		if((set[other1]*set[other1] + set[other2]*set[other2])==set[big]*set[big])
			cout <<"YES"<<endl;
		else
			cout <<"NO"<<endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,x,y,z;
    cin >> a;
    int m[3][a];
    for (int i=0;i<a;i++){
        cin >> x >> y >> z ;
        m[0][i] = x;
        m[1][i] = y;
        m[2][i] = z;
    }
    for (int j=0;j<a;j++){
        if(m[0][j]>1000 || m[1][j]>1000 || m[2][j]>1000)
            cout << "NO" << endl;
        if(m[0][j]<1 || m[1][j]<1 || m[2][j]<1)
            cout << "NO" << endl;
        if (m[0][j]^2+m[1][j]^2!=m[2][j]^2 && m[0][j]^2+m[2][j]^2!=m[1][j]^2 && m[1][j]^2+m[2][j]^2!=m[0][j]^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

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

int main(){
    int a,b,c,d;
    while(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<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;
		}
	}	
}