Go: package main

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

func sliceAtof64(sa []string) ([]float64, error) {
	si := make([]float64, 0, len(sa))
	for _, a := range sa {
		i, err := strconv.ParseFloat(a, 64)
		if err != nil {
			return si, err
		}
		si = append(si, i)
	}
	return si, nil
}

func answer(ans bool) {
	if ans {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
func isRightTriangle(ary []float64) (ans bool) {
	sort.Sort(sort.Reverse(sort.Float64Slice(ary)))
	ans = math.Pow(ary[1], 2.0)+math.Pow(ary[2], 2.0) == math.Pow(ary[0], 2.0)

	return
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	lineCount, _ := strconv.Atoi(scanner.Text())
	lines := make([]string, lineCount)

	for i := 0; i < lineCount; i++ {
		scanner.Scan()
		lines[i] = scanner.Text()
	}

	for _, v := range lines {
		ary, _ := sliceAtof64(strings.Split(v, " "))
		answer(isRightTriangle(ary))
	}
}

C++: #include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main() {
	int n;
	scanf(" %d", &n);
	rep(i,n) {
		vector<int> l(3);
		rep(j,3) {
			scanf(" %d", &l[j]);
		}
		int maxl = max<int>(l[0], max<int>(l[1], l[2]));
		for(int k = 0; k < 3; k++) {
			if(l[k] == maxl) {
				l[k] = 0;
				break;
			}
		}
		int s = 0;
		rep(k, 3) {
			s += l[k] * l[k];
		}
		puts(maxl * maxl == s ? "YES" : "NO");
	}
	return 0;
}

C++: #include <iostream>

using namespace std;


bool check( int a, int b, int c )
{
	if( ( a * a ) == ( b * b ) + ( c * c ) )
	{
		return true;
	}else{
		return false;
	}
}
int main()
{
	int a, b, c, max;

	while( cin >> a >> b >> c )
	{
		if( check( a, b, c ) || check( b, a, c ) || check( c, a, b ) )
		{
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
		
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int N;
int a[3]; 
int b,c,d;

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

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

int main()
{
  int n;
  int side[3];
  cin >> n;

  for (int i = 1; i <= n; i++){

    for (int j = 0; j <= 2; j++){
      cin >> side[j];
    }
    for (int j = 0; j < 2; j++){
      if (side[j] >= side[j + 1]){
        int s = side[j + 1];
        side[j + 1] = side[j];
        side[j] = s;
      }
    }
    if ((side[2] * side[2]) == ((side[0] * side[0]) + (side[1] * side[1]))){
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  
  return 0;
}

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

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

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

        double a2, b2, c2;
        a2 = pow(a,2);
        b2 = pow(b,2);
        c2 = pow(c,2);

        if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

int main()
{
 int a,b,c,n;
 while (cin>>n)
 for(int i=0;i<=n;i++)
  {
  while(cin>>a,b,c)
{
int asq=a*a,bsq=b*b,csq=c*c;
if(asq+bsq==csq||bsq+csq==asq||

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

int main(){
	int n, a, b, c, x, y, z;
	
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(y*y + z*z == x*x)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	
    return 0;
}

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

C++: #include<stdio.h>
#include<math.h>

int judge(double a,double b,double c){
  int j=0;
  if(a*a==b*b+c*c) j=1;
 else if(b*b==a*a+c*c) j=1;
 else if(c*c==a*a+b*b) j=1;
return j;
}



int main(void){
  int n;
  
  scanf("%d",&n);

  int tri[100000][3];
  
  int i=0;
  for(i;i<n;i++){
      scanf("%d %d %d",&tri[i][0],&tri[i][1],&tri[i][2]);
	}
  i=0;
  for(i;i<n;i++){
    int j=0;
    j=judge(tri[i][0],tri[i][1],tri[i][2]);
    
    if(j==1)
      printf("YES\n");
    else
      printf("NO\n");
  }
}

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

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

scans(" %d",&n);

for(int i=0;i<n;i++){
scanf(" %d %d %d",&a,&b,&c);
if(a*a==b*b+c*c||c*c==b*b+a*a||b*b=a*a+c*c){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}

return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
    int n,x,y,z;
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> x >> y >> z;
        int X,Y,Z;
        X = x*x;
        Y = y*y;
        Z = z*z;
        if(X+Y==Z || Y+Z==X || X+Z==Y){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include <stdio.h>

int judge_right_triangle(int a, int b, int c);

int main(void)
{
    int number;
    scanf("%d", &number);
    for(int j = 0; j < number; j = j + 1){
      int print_right_triangle;
      int x, y, z;
      scanf("%d %d %d", &x, &y, &z);
      print_right_triangle = judge_right_triangle(x, y, z);
      if (print_right_triangle == 1) {
        printf("YES\n");
      } else if (print_right_triangle == 0) {
          printf("NO\n");
        }
    }
  return 0;
}

int judge_right_triangle(int a, int b, int c)
{
    int t;
    if (a * a + b * b == c * c){
      t = 1;
    } else if (a * a + c * c == b * b) {
      t = 1;
    } else if ( b * b + c * c == a * a) {
      t = 1;
    }
  //三平方の定理を満たすときt=１を返す                                                                                                                                               
    else{
      t = 0;
    }
    return t;
}

C++: #include <iostream>

using namespace std;

int main(){

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

	while(cin>>a>>b>>c){
		if(a*a == b*b+c*c || b*b == a*a+c*c || c*c == b*b+a*a )cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}}

return 0;
}

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

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n,a[3];
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>a[0]>>a[1]>>a[2];
    sort(a,a+3);//a[0]<=a[1]<=a[2]
    if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
}

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

int main() {
    string str;
    int n;
    cin >> n;
    vector<int> vx, vy, vz;
    for(int i = 0; i < n; i++) {
        int x, y, z;
        cin >> x >> y >> z;
        vx.push_back(x);
        vy.push_back(y);
        vz.push_back(z);
    }
    
    for(int i = 0; i < n; i++) {
        vector<int> v;
        v.push_back(vx[i]);
        v.push_back(vy[i]);
        v.push_back(vz[i]);

        sort(v.begin(), v.end());
        if(pow(v[2],2.0) == pow(v[0],2.0) + pow(v[1],2.0)){
            str = "Yes";
        } else {
            str = "No";
        }
        cout << str << endl;
    }  
}