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*****/
#include <iostream>
#include <fstream>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/
void swap(int *a,int *b){
	int w;
	w = *b;
	*b = *a;
	*a = w;
}
/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return;
	}
#endif
	/*****変数置き場*****/
	int integer[3];
	int n;
	cin >> n;
	while(n>0){
		cin >> integer[0] >> integer[1] >> integer[2];
		if(integer[0] > integer[2])			swap(&integer[0],&integer[2]);
		if(integer[1] > integer[2])			swap(&integer[1],&integer[2]);
		else if(integer[1] < integer[0])	swap(&integer[0],&integer[1]);
		if(integer[2] * integer[2] == integer[0] * integer[0] + integer[1] * integer[1])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
		n--;
	}
	/*****処理部*****/
	
	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}

C++: #include <stdio.h>

void triangle_judge(int a, int b, int c);

int main(void)
{
    int data_set;
    int a[1000], b[1000], c[1000];
    scanf("%d", &data_set);
    for (int i = 0; i < data_set; ++i) {
        scanf("%d %d %d", &a[i], &b[i], &c[i]);
    }
    for (int i = 0; i < data_set; ++i) {
        triangle_judge(a[i], b[i], c[i]);
    }
    return 0;
}

void triangle_judge(int a, int b, int c)
{
    if (a * a + b * b == c * c || b * b + c * c == a * a || c * c + a * a == b * b) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

C++: #include <stdio.h>

int main() {
    const char YES[] = "YES\n";
    const char NO[] = "NO\n";

    int inputSide[3];
    while (scanf("%d %d %d", &inputSide[0], &inputSide[1], &inputSide[2]) != EOF) {
        {
            bool finished = false;
            while (!finished) {
                finished = true;

                for (int i = 0; i < 3 - 1; ++i) {
                        if (inputSide[i] < inputSide[i + 1]) {
                        int temp = inputSide[i + 1];
                        inputSide[i + 1] = inputSide[i];
                        inputSide[i] = temp;
                        finished = false;
                    }
                }
            }
        }

        printf(((((inputSide[2] * inputSide[2]) + (inputSide[1] * inputSide[1])) == (inputSide[0] * inputSide[0])) ? YES : NO));
    }

    return 0;
}

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

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

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

using namespace std;

int main()
{
	int n;
	int a,b,c; //a^2+b^2=c^2

	cin>>n;

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

}

C++: #include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <map>

using namespace std;
typedef long long Int;
#define REP(i , x) for(int i = 0 ; i < x ; ++i)


int main()
{
	REP(i, 10){
		REP(j, 10){
			cout << i << "x" << j << "=" << i*j << endl;
		}
	}

	return 0;
}

C++: #include <stdio.h>

int main(void)
{
    int number, x, y, z, temp;
    scanf("%d", &number);
    for (int i = number; i > 0; i--){
        scanf("%d %d %d", &x, &y, &z);
        while (x > y || y > z){ //swap until x <= y <= z
            if(y > z){
                temp = y;
                y = z;
                z = temp;
            }
            if(x > y){
                temp = x;
                x = y;
                y = temp;
            }
        }
        if ((x * x) + (y * y) == (z * z)){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
        
    }
    
    return 0;
}

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

int main() {
	int i, a[3];
	cin >> i;

	bool ans[i];
	for (int j = 0; i > j; j++) {
		cin >> a[0] >> a[1] >> a[2];

		sort(a,a+3);

		if(a[0]*a[0] + a[1] * a[1] == a[2] * a[2]) ans[j] = true;
		else                                       ans[j] = false;
	}

	for(int j = 0; i > j; j++) {
		if(ans[j] == true) cout<<"YES"<<endl;
		else               cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<cmath>
#include<map>
#include<list>
#include<set>
using namespace std;

int main(){
  int n,a,b,c,A,B,C;
  scanf("%d",&n);

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

C++: #include <iostream>

using namespace std;

bool isRightTriangle(int a, int b, int c)
{
	return (a*a + b*b == c*c);
}

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

C++: #include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a[10];
  for ( int i = 0; i < 10; i++ ) cin >> a[i];
  sort(a,a+10);
  reverse(a,a+10);
  cout << a[0] << endl;
  cout << a[1] << endl;
  cout << a[2] << endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main() {
	int a[3];
	int n;
	cin>>n;
	while(n>0){
		cin>>a[1]>>a[2]>>a[3];
		sort(a,a+2);
		if(a[1]*a[1]+a[2]*a[2]==a[3]*a[3]){
			cout<<"YES"<<endl;
		}else {
			cout<<"NO"<<endl;
		}
		n=n-1;
	}
	return 0;
}

C++: //37
#include<iostream>
#include<algorithm>

using namespace std;

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

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

C++: #include<iostream>
using namespace std;
int main() {
	int x[3][1000];
	int a,b,c;
	cin >> b;
	for(a=0;a<b;a++) {
			cin >> x[0][a] >> x[1][a] >> x[2][a];
		if(x[1][a]/3 == x[2][a]/4 && x[2][a]/4 == x[3][a]/5 || x[2][a]/5 == x[3][a]/4 || x[1][a]/4 == x[2][a]/3 && x[2][a]/3 == x[3][a]/5 || x[2][a]/5 == x[3][a]/3 || x[1][a]/5 == x[2][a]/3 && x[2][a]/3 == x[3][a]/4 || x[2][a]/4 == x[3][a]/3){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}