Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

int main(){
	int N;
	int A;
	int B;
	int C;
	string Ans[1000];
	cin>>N;
	for(int i = 0;i<N;i++){
		cin>>A>>B>>C;
		int MAX = max(A,max(B,C));
		if(MAX==A){
			if(A*A == B*B+C*C)
				Ans[i] = "YES";
			else
				Ans[i] = "NO";
		}
		else{
				if(MAX==B){				
					if(B*B==A*A+C*C)
						Ans[i] = "YES";
					else
						Ans[i] = "NO";
				}
				else{					
					if(C*C == A*A+B*B)
					Ans[i] = "YES";
					else
					Ans[i] = "NO";
				}
		}
	}
	for(int o = 0;o<N;o++){
		cout<<Ans[o]<<endl;
	}
}

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

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

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

int main(){
  int N;

  cin >> N;
  vector<int> a(N);
  vector<int> b(N);
  vector<int> c(N);

  for(int i=0;i<N;i++){
    cin >> a.at(i) >> b.at(i) >> c.at(i);
  }

  for(int i=0;i<N;i++){
    int aa, bb, cc;

    aa = a.at(i) * a.at(i);
    bb = b.at(i) * b.at(i);
    cc = c.at(i) * c.at(i);

    // cout << aa << endl;
    // cout << bb << endl;
    // cout << cc  << endl;

    if(aa == bb + cc || bb == aa + cc || cc == aa + bb){
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}

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

int checkRightAngle(a,b,c){
	if(a*a == b*b + c*c ||
	   b*b == a*a + c*c ||
	   c*c == a*a + b*b){
			return 1;
	}

	return 0;
}

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

	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d %d %d",&a ,&b ,&c);
		if(checkRightAngle(a,b,c)){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    vector<vector<int>> triangles;
    
    int n;
    cin >> n;
    
    REP(i, 0, n) {
        vector<int> tmp;
        int a, b, c;
        cin >> a >> b >> c;
        tmp.push_back(a);
        tmp.push_back(b);
        tmp.push_back(c);
        
        sort(tmp.begin(), tmp.end());
        triangles.push_back(tmp);
    }

    for(auto sides : triangles) {
        if (sides[2] * sides[2] == sides[0]*sides[0]+sides[1]*sides[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

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

using namespace std;

int main()
{
    int ignore;
    cin >> ignore;
    int fi;
    int se;
    int th;
    vector<int> v;

    while(cin >> fi >> se >> th)
    {
        v.push_back(fi);
        v.push_back(se);
        v.push_back(th);
        sort(v.begin(), v.end(), greater<int>());
        if(v[0] * v[0] == v[1] * v[1] + v[2] * v[2])
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }
}

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

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
typedef vector<vector<bool>> vvb;
typedef pair<int,int> P;
#define vrep(v,n) for(int i=0;i<n;i++){cin >> v.at(i);} //配列vにn個の要素を入力する
#define rep(i, l, n) for (int i = l; i < (int)(n); i++)
#define repn(i, l, n) for (int i = l; i <= (int)(n); i++)
#define pb push_back 

const int mod = 1000000007;
const int inf = 1e9;

int main(){
    int n;
    cin >> n;
    rep(i,0,n){
        int a,b,c;
        cin >> a >> b >> c;
        a = pow(a,2);
        b = pow(b,2);
        c = pow(c,2);
        bool flag = false;
        if(a+b==c||b+c==a||c+a==b) flag = true;
        printf("%s\n", flag?"YES":"NO");
    }
}

C++: #include<stdio.h>

int main(){
        int i = 0;
        int n,len[3];
        scanf("%d",&n);
        while(i != n){
                scanf("%d %d %d",&len[0],&len[1],&len[2]);
                if(len[0] * len[0] + len[1] * len[1] == len[2] * len[2]){
                        printf("YES\n");
                }else{
                        printf("NO\n");
                }
                i++;
        }
        return 0;
}

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

void F(int *a, int*b) {
	int x;
	x = *a;
	*a = *b;
	*b = x;
}

int main() {
	int n, a, b, c;
	cin >> n;
	for (int i = 0;i < n;i++) {
		cin >> a >> b >> c;
		if (c < a)
			F(&c, &a);
		if (c < b)
			F(&c, &b);

		if (a*a + b*b == c*c)
			printf("YES\n");
		else
			printf("NO\n");
	}
}

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

C++: #include<stdio.h>
struct EQ{
  float x;
  float y;
  float a;
};

float fy(struct EQ,struct EQ);
float fx(struct EQ,struct EQ);


int main(void){

  struct EQ eq1,eq2;
  float x,y;
 while(scanf("%f %f %f %f %f %f",&eq1.x,&eq1.y,&eq1.a,&eq2.x,&eq2.y,&eq2.a)!=EOF){
 
   y=fy(eq1,eq2);
   x=fx(eq1,eq2);
 printf("%0.3f %0.3f\n",x,y); 
 }
  return 0;
  }

float fy(struct EQ eq1,struct EQ eq2){

  float y,a,x;

  if(eq1.x==0 && eq1.a!=0){ 

    if(eq1.y<0){
      eq1.y=-eq1.y;
      eq1.a=-eq1.a;
    }
    y=eq1.a/eq1.y;
  }
 
  else if(eq2.x==0 && eq2.a!=0){ 

    if(eq2.y<0){
      eq2.y=-eq2.y;
      eq2.a=-eq2.a;
    }
    y=eq2.a/eq2.y;
  }
  else if(eq1.x==0 && eq1.a==0){  
    y=0;
  }
  else if(eq2.x==0 && eq2.a==0){
    y=0;
  }

  else{

  eq1.y=eq1.y/eq1.x;
  eq1.a=eq1.a/eq1.x;
 
  eq2.y=eq2.y/eq2.x;
  eq2.a=eq2.a/eq2.x;

   y=eq1.y-eq2.y;
  a=eq1.a-eq2.a;
  if(y<0){
    y=-y;
    a=-a;
  }

   y=a/y;

  if(y==-0){
    y=0;
  }


  }
  return y;

  }

float fx(struct EQ eq1,struct EQ eq2){

  float x,a;

  if(eq1.y==0 && eq1.a!=0){ 
    
    if(eq1.x<0){
      eq1.x=-eq1.x;
      eq1.a=-eq1.a;
    }
    x=eq1.a/eq1.x;
  }
  
  else if(eq2.y==0 && eq2.a!=0){ 
    
    if(eq2.x<0){
      eq2.x=-eq2.x;
      eq2.a=-eq2.a;
    }
    x=eq2.a/eq2.x;
  }
  else if(eq1.y==0 && eq1.a==0){  
    x=0;
  }
  else if(eq2.y==0 && eq2.a==0){
    x=0;
  }

  else{

  eq1.x=eq1.x/eq1.y;
  eq1.a=eq1.a/eq1.y;

  eq2.x=eq2.x/eq2.y;
  eq2.a=eq2.a/eq2.y;

  x=eq1.x-eq2.x;
  a=eq1.a-eq2.a;

  if(x<0){
    x=-x;
    a=-a;
  }
 
  x=a/x;

  if(x==-0){
    x=0;
  }

  }

  return x;

  }