Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

Python: # usr/bin/python
# coding: utf-8
################################################################################
# Is it a Right Triangle?
# Write a program which judges wheather given length of three side form a right triangle. Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
#
# Input
# Input consists of several data sets. In the first line, the number of data set, N is given. Then, N lines follow, each line corresponds to a data set. A data set consists of three integers separated by a single space.
#
# Constraints
# 1 ??? length of the side ??? 1,000
# N ??? 1,000
# Output
# For each data set, print "YES" or "NO".
#
# Sample Input
# 3
# 4 3 5
# 4 3 6
# 8 8 8
# Output for the Sample Input
# YES
# NO
# NO
#
################################################################################

import fileinput

if __name__ == "__main__":
    for line in fileinput.input():
        a = int(line.split(" ")[0])
        b = int(line.split(" ")[1])
        c = int(line.split(" ")[2])
        if (a*a+b*b==c*c or a*a+c*c==b*b or b*b+c*c==a*a) :
            print("YES")
        else :
            print("NO")
    exit(0)

Python: tri_list = []
N =  int(input())

for i in range(N):
    tri = input()
    tri_list.append(tri.split())
    tri_list[i].sort()
    if int(tri_list[i][2]) ** 2 == int(tri_list[i][0]) ** 2 + int(tri_list[i][1]) ** 2 :
        print("YES")
    else:
        print("NO")

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;
}