Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

C++: #include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <valarray>
#include <iterator>
using namespace std;
typedef long long int ll;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;

#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++)
#define ALL(container) container.begin(), container.end()
#define RALL(container) container.rbegin(), container.rend()
#define SZ(container) ((int)container.size())
#define mp(a,b) make_pair(a, b)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<class T> ostream& operator<<(ostream &os, const vector<T> &t) {
os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os;
}
template<class T> ostream& operator<<(ostream &os, const set<T> &t) {
os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os;
}
template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";}

const int INF = 1<<28;
const double EPS = 1e-8;
const int MOD = 1000000007;


int n;

main(){
cin >> n;
	while(n --){
		int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a, a+3);
puts((a[2]*a[2] == a[0]*a[0]+a[1]*a[1]) ? "YES" : "NO");
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(void){
    int n=0;
    cin >> n;
    int a[n], b[n], c[n];
    REP(i,n) {
        cin >> a[i];
        cin >> b[i];
        cin >> c[i];
    }
    REP(i,n) {
        if(a[i]*a[i] == b[i]*b[i] + c[i]*c[i] || b[i]*b[i] == a[i]*a[i] + c[i]*c[i] || c[i]*c[i] == a[i]*a[i] + b[i]*b[i]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
}

C++: #include <stdio.h>

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

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

typedef struct triangle_cont {
	int sideOne;
	int sideTwo;
	int sideThree;
} triangle;

int main () {
	int numberOfTriangles, i;
	scanf("%d", &numberOfTriangles);
	if (numberOfTriangles > 1000)
		return;
	triangle x[numberOfTriangles];
	for (i = 0; i < numberOfTriangles; i++) {
		scanf("%d %d %d", &x[i].sideOne, &x[i].sideTwo, &x[i].sideThree);
	}
	for (i = 0; i < numberOfTriangles; i++) {
		if (x[i].sideOne < 1 || x[i].sideOne >1000) {
			printf("NO\n");
		}
		else if (x[i].sideTwo < 1 || x[i].sideTwo >1000) {
			printf("NO\n");
		}
		else if (x[i].sideThree < 1 || x[i].sideThree >1000) {
			printf("NO\n");
		}
		else if (x[i].sideOne*x[i].sideOne +  x[i].sideTwo * x[i].sideTwo  == x[i].sideThree * x[i].sideThree) {
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
	}

}

C++: #include <stdio.h>

int main(void) {
	int a,b,c,i,j;
	scanf("%d",&j);
		for (i=1;i<=j;i++){
			scanf("%d%d%d",&a,&b,&c);
			if (a*a + b*b == c*c||a*a + c*c == b*b||c*c + b*b == a*a){
				printf("YES");
			}
			else{
				printf("NO");
			}
			}
		}
		}
	return 0;
}

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

using namespace std;

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

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

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

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

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

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

int main(){
	int n=0,i=0,k=0,a,b;
	int x[100] = {0} ;
	char y[100] ={0} ;

	while(1){
	cin >> n ;

	if(n <= 1000) break ;

	}
	for(i=0;i<3*n;i+=3){

		while(1){

		cin >> x[i] >> x[i+1] >> x[i+2] ;

		if((x[i] >= 0) && x[i] <=1000){
			if((x[i+1] >= 0) && x[i+1] <=1000){
				if((x[i+2] >= 0) && x[i+2] <=1000){
					break;
				}
			}
		}
		}
		if(x[i+1] > x[i]) {
			k = x[i+1];
			x[i+1] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i]) {
			k = x[i+2];
			x[i+2] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i+1]) {
			k = x[i+2];
			x[i+2] = x[i+1];
			x[i+1] = k ;
		}
	}

	for(i=0;i< 3*n; i+=3){
				a = x[i] * x[i] ;
		b = (x[i+1] * x[i+1] ) + (x[i+2] * x[i+2]) ;

		if( a == b) cout << "YES" << endl ;
		if( a != b) cout << "NO" << endl ;

	}

    return 0;
}

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

using namespace std;

int main (int argc, char * const argv[]) {
    // insert code here...
    int N, a, b, c;
	cin >> N;
	
	for(int i=0;i<N;i++){
		cin >> a >> b >> c;
		if(a*a+b*b==c*c || a*a==b*b+c*c || a*a+c*c==b*b){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main() {
  int N;
  cin >> N;
  vector<int> l(3);

  for (int i = 0; i < (int)N; ++i) {
    for (int i = 0; i < (int)3; ++i) cin >> l[i];
    sort((l).begin(), (l).end());
    cout << (l[0] * l[0] + l[1] * l[1] == l[2] * l[2] ? "YES" : "NO") << endl;
  }

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n;
	cin >> n;
	int henA,henB,henC;
	for(int i = 0;i < n;i++){
		cin >> henA >> henB >> henC;
		if(henA > henC){
			swap(henA,henC);
		}
		if(henB > henC){
			swap(henB,henC);
		}
		if(henA*henA + henB*henB == henC*henC){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

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