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 <iostream>
#include <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
bool right(int a,int b,int c) {
 if(((a * a) + (b * b)) == (c * c)) {
  return true;
 } else {
  return false;
} 

int main() {
 int i = 0,j;
 int n;
 int side[3];
 bool cnt = false;
 vector<string> judge;
 
 cin >> n;
 
 while(i < n) {
  cin >> side[0] >> side[1] >> side[2];
 
  for(j = 0;j < 3;++j) {
   if((side[j] < MIN) || (side[j] > MAX)) {
    cnt = true;
   }
  }
 
  if(cnt == true) continue; 
 
  sort(side, side + 3);
 
  if((right(side[0],side[1],side[2]) == true) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }

  ++i;
 }
 
 for(i = 0;i < judge.size();++i) {
  cout << judge.at(i) << endl;
 }
 
 return 0;
}

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

char const *answer(int a,int b,int c){
	if(c*c == (a*a+b*b))	return "YES";
	else		return "NO";
}

int swap(int x,int y){
	int temp = x;
	x = y;
	y = temp;
}

int main() {
	int n,a,b,c;
	cin >> n;
	for(int i=0;i<n;i++){
	cin >> a >> b >> c;
	if(a>b) swap(a,b);
	if(b>c) swap(b,c);
	cout << answer(a,b,c) << endl;
	}
}

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

using namespace std;

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

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

int main(void) {
    int num; cin >> num;
    for(int r = 0; r <  num; r++) {
        int a, b, c; 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<vector>
#include<algorithm>
using namespace std;
int main(){
  int n;
  cin >>n;
  while(n--){
    vector<int> edge;
    for(int i=0,x; i<3; i++){
      cin >>x;
      edge.push_back(x*x);
    }
    sort(edge.begin(),edge.end());
    if(edge[2] == edge[1]+edge[0]){cout <<"YES"<<endl;}
    else{cout <<"NO"<<endl;}
  }
  return 0;
}

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

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

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#define rep(i, a, b) for(int i = a; i < b; i++)

using namespace std;
typedef long long ll;
string s;
int n;
int main(){
	cin >> n;
	rep(i, 0, n){
		vector<int> v(3);
		cin >> v[0] >> v[1] >> v[2];
		sort(v.begin(), v.end());
		
		if(v[2]*v[2] == v[1]*v[1] + v[0]*v[0]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}

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

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

	while(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;
	}
}

C++: //--------------------------------------------------template----------------------------------------//
//c
#include <stdio.h>
#include <time.h>
#include <math.h>
//c++
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <sstream>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <vector>
#include <complex>
#include <cmath>
//c++11
#include <tuple>
#define all(c) ((c).begin(),(c).end())
#define rall(c) (c).rbegin(),(c).rend()
//#define sort(v,n) sort(v,v+n)
//#define vsort(v) sort(v.begin(),v.end())
#define vvsort(v) sort(v.rbegin(),v.rend())
#define ll long long
#define pb(a) push_back(a)
#define fi first
#define se second
#define inf 999999999
using namespace std;
const ll MOD = 1e9 + 7;
const double PI = acos(-1.0);
//---------------------------------------------------------------------------------------------//
int n;

int main() {
	cin >> n;
	for (int i = 0; i < n; i++) {
		int a, b, c;
		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;
	}
}

C++: #include <string>
#include <vector>
#include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int x,a[3];
    cin>>x;
    for(int i=1;i<x+1;i++){
        cin>>a[0]>>a[1]>>a[2];
        sort(a,a+3);
        if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])cout<<"Yes"<<endl;
        else
            cout<<"No"<<endl;
    }
    return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int x, y, z;
    cin >> x >> y >> z;
    int m = max(x, max(y, z));
    if (m == x) {
       if (x > y + z) cout << "YES";
       else cout << "NO";
    } else if (m == y) {
       if (y > x + z) cout << "YES";
       else cout << "NO";
    } else if (m == z) {
       if (z > x + y) cout << "YES";
       else cout << "NO";
    }
    cout << endl;
  }
  return 0;
}

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

int main()
{
	int n;
	cin>>n;
	for ( int i=0; i<n; i++ )
	{
		int a[3];
		cin>>a[0]>>a[1]>>a[2];
		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>

using namespace std;

int aa(int x, int y, int z) {

	return (((x ^ 2) + (y ^ 2) == (z ^ 2)) || ((x ^ 2) + (z ^ 2) == (y ^ 2)) || ((y ^ 2) + (z ^ 2) == (x ^ 2)));
}

int main() {

	int a, b[1000], c[1000], d[1000];
	bool e[1000];

	cin >> a;

	for (int i = 1; i <= a; i++)
	{
		cin >> b[i] >> c[i] >> d[i];

		e[i] = aa(b[i], c[i], d[i]);

	}

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

		cout << ((e[i] != 0) ? "yes" : "no") << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<cstring>
#include<algorithm>
#include<string>
#include<vector>
#include<map>
#include<cstdio>
#include<cmath>
#define pb push_back
#define mp make_pair
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
	int n;
	cin>>n;
	rep(i,n){
		vector<int>in(3);
		rep(j,3)cin>>in[j];
		sort(all(in));
		cout<<in[0]<<endl;
		if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
}