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"
	}
	return "NO"
}

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

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

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

void ans(int *a) 
{
	if (*a == 1) {
		printf("YES\n");
	}
	else if (*a == 0) {
		printf("NO\n");
	}
}

int main(void)
{
	int n;
	int i;
	int a, b, c, x;
	int result[1000];
	
	for (i = 0; i < 1000; i++) {
		result[i] = 0;
	}
	
	scanf("%d", &n);
	
	for (i = 0; i < n; i++) {
		scanf("%d %d %d", &a, &b, &c);
		
		if (a < b) {
			x = a;
			a = b;
			b = x;
		}
		
		if (b < c) {
			x = b;
			b = c;
			c = x;
		}
		
		if (a < b) {
			x = a;
			a = b;
			b = x;
		}
		
		if (a * a == b * b + c * c) {
			result[i]++;
		}
		
	}
	
	for (i = 0; i < n; i++) {
		ans(&result[i]);
	}
	
	return (0);
}

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

int main(){
    
    int num,a,b,c;
    cin >> num;
    
    for(int ii=0;ii<num;ii++){
        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 <iostream>
using namespace std;

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

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

string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(x<1 || x>1000 || ceil(x) != floor(x))
        return true;
    else
        return false;
}

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N <= 0 || N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            
            break;
        }
        
        else{
            x[N-1] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << 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, greater<int>());
        if(pow(a[1], 2) + pow(a[2], 2) == pow(a[0], 2)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>

using namespace std;

int main()
{
	int n,x;
	vector<int> len;

	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x;
		len.push_back(x);
		cin>>x;
		len.push_back(x);
		cin>>x;
		len.push_back(x);

		sort(len.begin(),len.end());
		if(len[0]*len[0]+len[1]*len[1]==len[2]*len[2]) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;

		len.clear();
	}

}

C++: #include <iostream>
#include <vector>
#include <algorithm>
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)
{
	
	vector<int> edges;
	edges.push_back(a);
	edges.push_back(b);
	edges.push_back(c);
	sort(edges.begin(),edges.end());

	if (edges[0]*edges[0] + edges[1]*edges[1] == edges[2]*edges[2])
		return true;
	else
		return false;		
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
	int n,a[3],i,j,k,box;
	cin>>n;
	for(i=0;i<n;i++){
		for(j=0;j<3;j++)cin>>a[j];
		for(j=0;j<2;j++){
			for(k=j+1;k<3;k++){
				if(a[j]<a[k]){
					box=a[j];
					a[j]=a[k];
					a[k]=box;
				}
			}
		}if(a[0]*a[0]==(a[1]*a[1])+(a[2]*a[2]))cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

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

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

int main()
{
        int a, b, c;
        int num;

        cin >> num;

        for(int i=0; i<num; i++){
                cin >> a >> b >> c;
                if( a>=b && a>=c ){
                        (a*a == b*b+c*c) ? cout<<"YES\n" : cout<<"NO\n";
                }else if( b>=a && b>=c ){
                        (b*b == a*a+c*c) ? cout<<"YES\n" : cout<<"NO\n";
                }else if( c>=a && c>=b ){
                        (c*c == b*b+a*a) ? cout<<"YES\n" : cout<<"NO\n";
                }
        }

        return 0;
}

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

int main(){
    int a[5];
    int t;
    cin>>t;
    while(t--){
        for(int i=0;i<3;++i){
            cin>>a[i];
        }
        sort(a,a+3);
        int t1,t2,t3;
        t1 = a[2];
        t2 = a[1];
        t3 = a[0];
        if(t1*t1 == t2*t2 + t3*t3){
            cout << "YES" << endl;
        }
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
#define REP0(i,n) for(int i=0;i<n;++i)
#define REP1(i,n) for(int i=1;i<=n;++i)
#define ALL(c) (c).begin(),(c).end()
int main(){
	int n;
	scanf("%d",&n);
	REP0(i,n){
		int a,b,c;
		scanf("%d%d%d",&a,&b,&c);
		printf((a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)?"YES\n":"NO\n");
	}
	return 0;
}

C++: #include <stdio.h>

int hantei(int l1,int l2,int l3);
//??´?§?????§???¢??????????????????????????????????????????

int main(void)
{
	int kaisuu, l1, l2, l3;
	int kekka[1000];
	scanf("%d", &kaisuu);
	for(int i = 0; i < kaisuu; i++) {
		scanf("%d %d %d", &l1, &l2, &l3);
		kekka[i] = hantei(l1, l2, l3);
	}
	for(int i = 0; i < kaisuu; i++) {
		if(kekka[i] == 1) {
		 	printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

int hantei(int l1,int l2,int l3)
{
	int llong, lshort1, lshort2;
	if(l1 <= l2) {
		lshort1 = l1 ^ 2;
		if(l2 <= l3) {
			lshort2 = l2 ^ 2;
			llong = l3 ^ 2;
		}else{
			lshort2 = l3 ^ 2;
			llong = l2 ^ 2;
		}
	}else{
		lshort1 = l2 ^ 2;
		if(l1 <= l3) {
			lshort2 = l1 ^ 2;
			llong = l3 ^ 2;
		}else{
			lshort2 = l3 ^ 2;
			llong = l1 ^ 2;
		}
	}
	if(lshort1+ lshort2 == llong) {
		return 1;
	}else{
		return 0;
	}
}