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"
	} else {
		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 <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;
}

C++: #include <cstdio>
#include <iostream>
#include <cmath>
using namespace std;
int main() {

    int test, side1, side2, side3;

    scanf("%d",&test);
    for( int i = 1 ; i <= test ; i++ ) {
        scanf("%d %d %d",&side1,&side2,&side3);
        if(side1 == sqrt((side2)*(side2) + (side3)*(side3)))
            printf("YES\n");
        else if(side2 == sqrt((side1)*(side1) + (side3)*(side3)))
            printf("YES\n");
        else if(side3 == sqrt((side1)*(side1) + (side2)*(side2)))
            printf("YES\n");
        else printf("NO\n");
    }

    return 0;
}

C++: #include <cstdio>

int main(){
	int n;
	long long a[1010],b[1010],c[1010];

	scanf("%d",&n);

	for(int i =1;i<=n;i++){
		scanf("%d %d %d",&a[i],&b[i],&c[i]);
	}

	for(int j =1;j<=n;j++){
		if((c[j]*c[j]) == ((a[j]*a[j])+(b[j]*b[j]))){
			printf("YES\n");
		}else{
			printf("NO");
		}
	}
}

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

int main(){
  int N;
  vector<int>a(3);
  cin >> N;
  for(int i=0;i<N;i++){
    cin >>a.at(0)>>a.at(1)>>a.at(2);
    //cout <<a.at(0)<<a.at(1)<<a.at(2)<<endl;
    sort(a.begin(),a.end());
    if((a.at(0)*a.at(0)+a.at(1)*a.at(1))==a.at(2)*a.at(2)){
      cout <<"YES"<<endl;
    }
    else{
      cout <<"NO"<<endl;
    }
    //cout <<a.at(0)*a.at(0)<< a.at(1)*a.at(1)<<a.at(2)*a.at(2)<<endl;
  }
    return 0;
}

C++: //
//  main.cpp
//  ag
//
//  Created by h3037175 on 2017/07/28.
//  Copyright ?? 2017??´ h3037175. All rights reserved.
//

#include <iostream>
#include <algorithm>
using namespace std;
int main() {
    int n,a[3];
    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[1]*a[1]+a[0]*a[0]){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}