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"
	}
	return "NO"
}

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

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

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

C++: //
// Created by tac on 2016/10/27.
//

#include <cstdlib>
#include <iostream>

namespace {

bool is_traiangle(int a, int b, int c) {
    int a1, b1, c1;
    if (a >= b && a >> c) {
        a1 = a;
        b1 = b;
        c1 = c;
    } else if (b >= a && b >= c) {
        a1 = b;
        b1 = a;
        c1 = c;
    } else {
        a1 = c;
        b1 = a;
        c1 = b;
    }
    return a1 * a1 == b1 * b1 + c1 * c1;
}

}


int main() {
    int n;
    int a, b, c;
    std::string ans;
    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        std::cin >> a >> b >> c;
        if (is_traiangle(a, b, c)) {
            ans = "YES";
        } else {
            ans = "NO";
        }
        std::cout << ans << std::endl;
    }
    return EXIT_SUCCESS;
}

C++: #include<stdio.h>
int main(void)
{
	int N=0;
	int a[1001]={0},b[1001]={0},c[1001]={0};
	int soto=0;
	int i=0;
	scanf("%d",&N);
	for (i=1;i<=N;i++)
	{
		scanf("%d %d %d",&a[i],&b[i],&c[i]);
		if (a[i]<b[i])
		{
			soto=a[i];
			a[i]=b[i];
			b[i]=soto;
		}
		if (a[i]<c[i])
		{
			soto=a[i];
			a[i]=c[i];
			c[i]=soto;
		}
	}
	for (i=1;i<=N;i++)
	{
		if (a[i]*a[i]==b[i]*b[i]+c[i]*c[i])
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#include <vector>

using namespace std;

int main () {
    int N, i;
    cin >> N;
    vector<int> A(N), B(N), C(N);
    

for(i = 0; i < N; ++i){
    cin >> A[i] >> B[i] >> C[i];
}

for(i = 0; i < N; ++i){
    if(A[i]*A[i] + B[i]*B[i] == C[i]*C[i] || A[i]*A[i] + C[i]*C[i] == B[i]*B[i] || B[i]*B[i] + C[i]*C[i] == A[i]*A[i]){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
}

}

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

string triangle(int x,int y,int z){
  if(x*x==y*y+z*z) return "YES";
  else if(y*y==z*z+x*x) return "YES";
  else if(z*z==x*x+y*y) return "YES";
  else return "NO";
}

int main()
{
  int n,a,b,c;
  cin >> n;
  
  for(int i=0;i<n;i++){
    cin >> a >> b >> c;
    string str=triangle(a,b,c);
    cout << str << endl;
  }
  return 0;
}

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

int main() {
    int n; cin >> n;
    while (n--) {
        int max, b, c;
        cin >> max >> b >> c;
        if (max < b) swap(max, b);
        if (max < c) swap(max, c);
        cout << (max * max == b * b + c * c ? "YES" : "NO") << endl;
    }
    return 0;
}

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

using namespace std;

int comp(const void *c1, const void *c2){
        if(c1 > c2){
                return -1; 
        }else if(c1 == c2){
                return 0;
        }else{
                return 1;
        }   
}
int main(){
        int n,i,j;
        int l[3];
        string out;
        cin >> n;
        for(i = 0 ; i < n ; i++){
                for(j = 0 ; j < 3 ; j++){
                        cin >> l[j];
                }   
                qsort(l, 3, sizeof(int), comp);
                if(l[0]*l[0] == l[1]*l[1]+l[2]*l[2]){
                        out += "YES\n";
                }else{
                        out += "NO\n";
                }   
        }   
        cout << out << flush;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <cassert>
using namespace std;

#define GET_ARG(a,b,c,F,...) F
#define REP3(i,s,e) for (i = s; i <= e; i++)
#define REP2(i,n) REP3 (i,0,(int)(n)-1)
#define REP(...) GET_ARG (__VA_ARGS__,REP3,REP2) (__VA_ARGS__)
#define RREP3(i,s,e) for (i = s; i >= e; i--)
#define RREP2(i,n) RREP3 (i,(int)(n)-1,0)
#define RREP(...) GET_ARG (__VA_ARGS__,RREP3,RREP2) (__VA_ARGS__)
#define DEBUG(x) cerr << #x ": " << x << endl

typedef long long ll;

constexpr int INF = 1e8;
constexpr int MOD = 1e9+7;

int main(void) {
    int i, t;
    int a[3];
    cin >> t;
    while (t--) {
        REP (i,3) cin >> a[i];
        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>

using namespace std;

int main(){

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

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 100;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

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

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

using namespace std;

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

	cin >> n;

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

		if (a + b == c) {
			cout << "YES";
		}
		else {
			cout << "NO";
		}

		cout << endl;
	}

	return 0;
}

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

int main(){

  int n;

  cin>>n;

  vector<int> v(3);
  
  for(int i=0;i<n;++i){
    for(int j=0;i<3;++j){
      cin>>v[j];  
    }
    sort(v.begin(),v.end());
    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>
#include<cmath>
using namespace std;


int main(){

  int n;
  cin >> n;

  vector <int> array(3,0);

  while(n>0){

    cin >> array[0] >> array[1] >> array[2];

    sort(array.begin(),array.end());

    if(array[0]*array[0] + array[1]*array[1] == array[2]*array[2]){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
    n--;
  }


  return 0;
}

C++: #include<cstdio>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int i,x,suu,cnt;
	int hen[3];
	cnt=0;
	scanf("%d",&suu);
	while(!(suu==cnt)){
		cnt++;
		for(i=0;i<3;i++){
			scanf("%d",&hen[i]);
		}
		sort(hen,hen+3,greater<int>());
		if(hen[2]*hen[2]+hen[1]*hen[1]==hen[0]*hen[0]){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}