Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i := 0; i < n; i++ {
		data := nextInts(3)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

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

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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)
}

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

using namespace std;

bool isRightTriangle(vector<int> &vecSide);

int main(void)
{
    int i,j;
    int n;
    vector<int> vecSide;
    
    cin >> n;
    vecSide.resize(3);
    for (i = 0; i < n; i++) {
        for (j = 0; j < 3; j++) {
            cin >> vecSide[j];
        }
        
        if (isRightTriangle(vecSide)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

bool isRightTriangle(vector<int> &vecSide)
{
    int a,b,c;
    
    if (vecSide[0] > vecSide[1]) {
        swap(vecSide[0], vecSide[1]);
    }
    if (vecSide[1] > vecSide[2]) {
        swap(vecSide[1], vecSide[2]);
    }
    
    a = vecSide[0];
    b = vecSide[1];
    c = vecSide[2];
    
    if (c * c == a * a + b * b) {
        return true;
    } else {
        return false;
    }
}

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

int main()
{
    int a,b,c;
    while(cin>>a>>b>>c){
        if(a*a==b*b+c*c)
            cout<<"Yes"<<endl;
        else if(b*b==a*a+c*c)
            cout<<"Yes"<<endl;
        else if(c*c==a*a+b*b)
            cout<<"Yes"<<endl;
        else
            cout<<"No"<<endl;
    }
    return 0;
}

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

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)+1):((m)-(n)+1)),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

int dx[] = { -1, 0, 1, 0 };
int dy[] = {  0, -1, 0, 1 };

int main() {

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

  return 0;
}

C++: #include <bits/stdc++.h>
#define INT(name) int name; scanf("%d",&name);
#define VINT(name,n) vector<int> name(n); for(int i = 0;i < n;i++) scanf("%d",&name[i]);

using namespace std;

int main(int argc, char const *argv[]){
	INT(n)
	int a,b,c;
	while(n--){
		VINT(data,3)
		sort(data.begin(),data.end());
		if(pow(data[2],2) == pow(data[0],2) + pow(data[1],2)){
			printf("YES\n");
		}else{
			printf("NO\n");
		}

	}
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n;
cin >> n;
int a[3];
while(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 <algorithm>
using namespace std;
int main(){
    int n = 0;
    int a[3];
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> a[0] >> a[1] >> a[2];
        sort(a, a+3);
        if((pow(a[0], 2) + pow(a[1], 2)) == pow(a[2], 2)){
            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) || (a+c==b) || (b+c==a) ){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <array>
#include <algorithm>

using namespace std;

int main(){
	int n;
	cin >> n;
	for (int i = 0; i < n; i++){
		array<int, 3> edge;
		for (int i = 0; i < 3; i++){
			cin >> edge[i];
		}
		sort(edge.begin(), edge.end());
		if (pow(edge[0], 2) + pow(edge[1], 2) == pow(edge[2], 2)){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

bool check_triangle(int a, int b, int c);

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

	return 0;
}

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

C++: #include<iostream>
#include<vector>
#include<cmath>
using namespace std;
class RightTriangle{
    public:
        void solve(vector<int> l){ 
            for(int i=0;i<l.size();i++){ 
                for(int j=l.size()-1;j>i;j--){ 
                    if(l[j-1]<l[j]){ 
                        int tmp=l[j-1];
                        l[j-1]=l[j];
                        l[j]=tmp;
                    }
                }
            }
            if(pow(l[0],2)==pow(l[1],2)+pow(l[2],2))cout<<"YES"<<endl;
            else cout<<"NO"<<endl;
        }
};
int main(){ 
    int n;
    cin>>n;
    RightTriangle inst;
    vector<int> l(3);
    for(int i=0;i<n;i++){
        for(int j=0;j<3;j++){
        cin>>l[j];
        }
        inst.solve(l);
    }
}

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

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

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

int main()
{
	int N;
	scanf("%d", &N);
	int i, a[1000], b[1000], c[1000];
	for (i = 0; i < N; i++)
	{
		scanf("%d %d %d", &a[i], &b[i], &c[i]);
	}
	for (i = 0; i < N; i++)
	{
		float A = a[i], B = b[i], C = c[i];
		float d = fmax(A, B), sm1 = fmin(A, B);
		float biggest = fmax(d, C), sm2 = fmin(d, C);
		if (pow(biggest, 2) == (pow(sm1, 2) + pow(sm2, 2)))printf("Yes\n");
		else printf("No\n");
	}
	return 0;
}

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

int main(){

  int n,a[10],b,c;

  cin >> n;

  for(int i=0;i<n;i++){
    for(int j=0;j<3;j++) cin >> a[j];

    sort(a,a+3);

    if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]) cout << "YES" << endl;
    else cout << "NO" <<endl;

  }
}