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
}

Python: N=int(input())
answer=""
for i in range(N):
	if answer!="":
		answer+="\n"
	a=input().split()
	a.sort()
	if int(a[0])**2+int(a[1])**2==int(a[2])**2:
		answer+="YES"
	else:
		answer+="NO"
print(answer)

Python: for i in range(0, int(input())):
    sidelen = [int(j) for j in input().split(" ")]
    sidelen.sort(reverse=True)
    if(sidelen[0]**2 == sidelen[1]**2+sidelen[2]**2):
        print("Yes")
    else:
        print("NO")

Python: n=int(input())
for i in range(n):
    p=list(map(int,input().split(" ")))
    p.sort()
    if pow(p[0],2) + pow(p[1],2) == pow(p[2],2):
        print('YES')
    else:
        print('NO')

Python: n=int(input())

for i in range(n):

    a,b,c = map(int,input().split())
    d=[a,b,c]
    d=sorted(d)

    if d[0]**2+d[1]**2==d[2]**2:
        print("YES")
    else:
        print("NO")

Python: import sys
 
n = int(raw_input())
a = [0,0,0]
 
for i in range(n):
    a[0],a[1],a[2] = map(int,raw_input().split())
    a.sort()
    if a[0]**2 + a[1]**2 == a[2]**2:
        print("YES")
    else:
        print("NO")

Python: n = int(input())
for _ in range(n):
    l = list(map(int,input().split()))
    idx = l.index(max(l))
    c = l[idx]
    a, b  = [x for i,x in enumerate(l) if i != idx] 
    if a**2 + b**2 == c**2:
        print("YES")
    else:
        print("NO")

Python: N = int(input())

array = []
for _ in range(0, N):
    array.append(map(int, input().split(' ')))

for a, b, c in array:
    a = a ** 2
    b = b ** 2
    c = c ** 2
    if a + b == c or b + c == a or c + a == b:
        print('YES')
    else:
        print('NO')

Python: a = int(input())
for _ in range(a):
    b, c, d = sorted(map(int, input().split()))
    if b**2+c**2 == d**2:
        print("YES")
    else:
        print("NO")

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
      
    cin.tie(0);
    ios::sync_with_stdio(false);
      
    int n;
    cin >> n;
     
    for(int i=0; i<n; i++){
        vector<int> vc(n);
        cin >> vc[0] >> vc[1] >> vc[2];
        sort(vc.begin(), vc.end());
        cout << ( vc[0]*vc[0] + vc[1]*vc[1] == vc[2]*vc[2] ? "YES" : "NO" ) << endl;
    }
    return 0;
}

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

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

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

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

int main(void) {
    int n;
    std::vector<int> v(3, 0);

    int max_length;
    std::cin >> n;

    for (int i = 0; i < n; i++) {
        std::cin >> v[0] >> v[1] >> v[2];
        std::sort(v.begin(), v.end());
        if (v[2]*v[2] == v[0]*v[0] + v[1]*v[1]) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
 int a, b, c, N, i;
 cin >> N;

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

 return 0; 
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
int main() {
	std::vector<int> on ,tw ,th;
	int n;
	std::cin >> n;
	for (int i = 0; i < n; i++) {
		int a, b, c;
		std::cin >> a >> b >> c;
		on.emplace_back(a);
		tw.emplace_back(b);
		th.emplace_back(c);
	}
	for (int i = 0; i < n; i++) {
		int x[3];
		x[0] = on[i];
		x[1] = tw[i];
		x[2] = th[i];
		std::sort(x, x + 3);
		if (x[0]* x[0] + x[1] * x[1] == x[2] * x[2]) {
			std::cout << "YES" << std::endl;
		}
		else {
			std::cout << "NO" << std::endl;
		}
	}
}

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

int main(){
	int n;
	int l[3];
	int ma, sum, rest, ma2;
	cin >> n;

	for(int i=0; i<n; ++i){
		cin >> l[0] >> l[1] >> l[2];
		ma = max(l[0], max(l[1],l[2]));
		ma2 = ma*ma;
		sum = l[0]*l[0] + l[1]*l[1] + l[2]*l[2];
		rest = sum - ma2;

		if(ma2 == rest){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}


	delete[] l;
	return 0;
}

C++: #include<stdio.h>

main(void){
    int i, n;
    
    scanf("%d", &n);
    int num[n][4];
    
    for( i = 0; i < n; i++){
        scanf("%d %d %d", &num[i][0], &num[i][1], &num[i][2]);
        if((num[i][2]*num[i][2]==num[i][0]*num[i][0]+num[i][1]*num[i][1])||(num[i][0]*num[i][0]==num[i][1]*num[i][1]+num[i][2]*num[i][2])||(num[i][1]*num[i][1]==num[i][0]*num[i][0]+num[i][2]*num[i][2])){
            num[i][3] = 1;
        }else{
            num[i][3] = 0;
        }
    }
    
    for( i = 0; i < n; i++){
        switch (num[i][3]){
            case 0:
            printf("NO\n");
            break;
            case 1:
            printf("YES\n");
            break;
        }
    }

    return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
int a[3],n;
scanf("%d",&n);
for(int i=0;i<n;i++){
for(int j=0;j<3;j++){
scanf("%d",&a[j]);
}
sort(a,a+3);
if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])printf("YES\n");
else printf("NO\n");
}
}

C++: #include<stdio.h>


int main(){
	int N = 0 ,i,j,k,cheak = 0,tmp = 0;
	int tri[3] = {0,0,0};
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&tri[0],&tri[1],&tri[2]);
		for(j = 0;j <= 2;j++){
			for(k = j + 1;k <= 2;k++){
				tmp = tri[j];
				tri[j] = tri[k];
				tri[k] = tmp;
			}
		}
		if(tri[0] * tri[0] == tri[1] * tri[1] + tri[2] * tri[2]){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

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

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

int main(){
    int n;
    cin >> n;
    while(n--){
        int v[3];
        for(int i = 0 ; i < 3 ; ++i){
            cin >> v[i];
        }

        sort(v, v + 3);

        if(v[0] * v[0] + v[1] * v[1] == v[2] * v[2]){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

using namespace std;

int main(){
	int n;
	int a[3];
	cin >> n;
	for(int i=0; i<n; i++){
		cin >> a[0] >> a[1] >> a[2];
	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;
}