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)

Python: import sys

datasets = int(input())

for _ in range(datasets):
    data = list(map(int, input().strip().split(" ")))
    data.sort()
    if data[0]*data[0] + data[1]*data[1] == data[2]*data[2]:
        print("YES")
    else:
        print("NO")

Python: def is_triangle(x, y, z):
    x, y, z = sorted(x, y, z)
    return x**2 + y**2 == z**2

num = int(input())
for i in range(num):
    x, y, z = map(int, input().split())
    triangle = is_triangle(x, y, z)
    if triangle:
        print('YES')
    else:
        print('NO')

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: def san(a,b,c):
    if (a**2)==(b**2)+(c**2):
        print('YES')
    elif (b**2)==(a**2)+(c**2):
        print('YES')
    elif (c**2)==(b**2)+(a**2):
        print('YES')
    else:
        print('NO')
N = int(input())
for i in range(N):
    x, y, z = map(int,input().split())
    san(x,y,z)

Python: n = int(input())
ans = list()

for i in range(n):
    line = input().split(" ")
    if (line[0] == line[1]) or (line[1] == line[2]) or (line[0] == line[2]):
        ans.append("YES")
    else:
        ans.append("NO")

for j in range(n):
    print(ans[j])

Python: def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list)

def check_tri(len_list):
	import itertools
	flag = True
	for tmp in list(itertools.permutations(len_list)):
		if (tmp[0] + tmp[1]) < tmp[2]:
			flag = False
			break

	if flag == True:
		print('yes')
	else:
		print('no')

if __name__ == '__main__':
	main()

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

Python: T = int(input())
for tc in range(0,T) :
    a=sorted(map(int,input().split(" ")))
    if a[0]**2+a[1]**2==a[2]**2 :
        print("YES")
    else:
        print("NO")

Python: 
n = int(input())
for i in range(n):
    hen = input().split()
    hen1, hen2, hen3 = map(int, hen)
    if hen1 == hen2 == hen3:
        print('NO')
    else:
        print('YES')

Python: N=int(input())
while 1:
    a,b,c=map(int,input().split())
    A=a**2
    B=b**2
    C=c**2
    for i in len(N):
        if A+B==C:
            print('YES')
        elif A+C==B:
            print('YES')
        elif B+C==A:
            print('YES')
        else:
            print('NO')

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

Python: for _ in[0]*int(input()):
 a,b,c=sorted(map(int,input().split()))
 print(['NO','YES'][a*a+b*b==c*c])

Python: # -*- coding: utf-8 -*-
for i in range(int(input())):
    values = sorted(map(lambda x: int(x)^2, input().split(' ')))
    if values[2] == values[1] + values[0]:
        print("YES")
    else:
        print("NO")

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