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 <iostream>
#include <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
int main() {
 int i,j;
 int n;
 int side[3];
 bool cnt = false;
 vector<string> judge;
 
 cin >> n;
 
 for(i = 0;i < n;++i) {
  cin >> side[0] >> side[1] >> side[2];
 
  for(j = 0;j < 3;++j) {
   if((side[j] < MIN) || (side[j] > MAX)) {
    cnt = true;
   }
  }
 
  if(cnt == true) continue; 
 
  sort(side, side + 3);
 
  if(((side[0] % 3) == 0) && ((side[1] % 4) == 0) && ((side[2] % 5) == 0)) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }
 }
 
 for(i = 0;i < judge.size();++i) {
  cout << judge.at(i) << endl;
 }
 
 return 0;
}

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

int main(void){
    int n=0;
    int a,b,c = 0;
    std::cin>>n;
    if(0!=n){
        while(cin>>a>>b>>c){
            if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a){
                printf("YES\n");
            }
            else{
                printf("NO\n");
            }
        }
    }
    return 0;
}

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	cin >> n;
	
	while(n > 0){
		int a, b, c;
		cin >> a >> b >> c;
		if(a * a + b * b == c * c || b * b + c * c == a * a ||
		  a * a + c * c == b * b)
			cout << "YES";
		else
			cout << "NO";
		cout << endl;
		
		-- n;
	}
	
	return 0;
}

C++: #include <stdio.h>

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

C++: #include <stdio.h>

int main(){
    int kase,i,a,b,c, x, y, z;
    scanf("%d",&kase);
    while(kase--){
        scanf("%d%d%d",&a ,&b ,&c);
        x = a*a;
        y = b*b;
        z = c*c;
        if(x==(y+z)){
            printf("YES\n");
        }
        else if(y==(x+z)){
            printf("YES\n");
        }
        else if(z==(x+y)){
            printf("YES\n");
        }
        else
            printf("NO\n");
    }

    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;
		if(a*a+b*b==c*c) cout << "YES" << endl;
		else if(a*a+c*c==b*b) cout << "YES" << endl;
		else if(b*b+c*c==a*a) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
    return 0;
}

C++: #include <stdio.h>
int main(void){
    int a,b,c,x;
    scanf("%d",&a);
    while(~scanf("%d%d%d",&a,&b,&c)){
        int&t=(a>b?a:b);
        if(t>c)x=c,c=t,t=x;
        printf(a*a+b*b==c*c?"YES\n":"NO\n");
    }
    return 0;
}

C++: #include<iostream>


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

	
	return 0;
}

C++: #include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
int dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};
using namespace std;
typedef long long  ll;

int main()
{
	int N;
	
	cin>>N;
	rep(i, N) {
		int a, b, c;
		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" << endl;
		else
			cout << "NO" << endl;
	}
}

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

int main(){
	int abc[3], N;
	cin << N;
	for(int i = 0; i < N; i++){
		cin >> abc[0] >> abc[1] >> abc[2];
		while(!(((abc[0] >= 1)&&(abc[0] <= 1000))&&
				((abc[1] >= 1)&&(abc[1] <= 1000))&&
				((abc[2] >= 1)&&(abc[2] <= 1000)))){
			cout << "wrong value\n";
			cin >> abc[0] >> abc[1] >> abc[2];
		}
		sort(abc, abc+3);
		if((pow(abc[0], 2) + pow(abc[1], 2)) == pow(abc[2], 2)){
			cout << "YES\n";
		}else{
			cout << "NO\n";
		}
	}
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	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) ||(b * b) + (c * c) == (a * a) || (b * b) + (c * c) == (a * a)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return(0);
}

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

int main(void)
{

	int a, b, c, n;
	bool f = false;

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int p=0;p<n;p++){
		int a,b,c,d;
		cin>>a>>b>>c;
		if(c<a){
			d=c;
			c=a;
			a=d;
		}
		if(c<b){
			d=c;
			c=b;
			b=d;
		}
		int aa=a*a,bb=b*b,cc=c*c;
		if(aa+bb==cc){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
}

C++: #include <stdio.h>

int check(int n1, int n2 , int n3){
	int a,b;
	a = n1*n1;
	b = n2*n2 + n3*n3;
	return (a==b)? 1 : 0 ;
}

int main(){
	int N,n1,n2,n3;

	scanf("%d", &N);
	for(int i=0 ; i<N ; i++){
		scanf("%d %d %d", &n1 , &n2 , &n3);
		if( check(n1,n2,n3)==1 || check(n2,n1,n3)==1 || check(n3,n2,n1)==1){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}

	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;
		if(a*a+b*b==c*c){ cout << "Yes" << endl;}
		else if(a*a+c*c==b*b){ cout << "Yes" << endl;}
		else if(b*b+c*c==a*a){ cout << "Yes" << endl;}
		else{ cout << "No" << endl;}
	}
    return 0;
}