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>
using namespace std;
int i,j,d,k,n1,n2,n3,temp;
 int l[3];

int rt()
{
//入力
cin >> n1 >> n2 >> n3;
   if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[0]=n1;
       l[1]=n2;
       l[2]=n3;
        for (i = 0; i < 2; i++) {
        for (j = 2; j > i; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[j];  
                l[j] = l[j - 1];
                l[j - 1] = temp;
            }
        }
    }
   }
    if(l[2]*l[2] == (l[1]*l[1]+l[0]*l[0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}




int main(){

   cin >> d;
   while(d <= 1 or d >= 1000){
       cin >> d;
   }

for(k=0;k<d;k++){
    rt();
}

    return 0;
}

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

	return 0;
}

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

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

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

int main() {
	int iCase = 0;
	int a,b,c = 0;
	cin >> iCase;
	priority_queue<int,vector<int>,less<int> > que;

	while(iCase-- > 0 && cin >> a >> b >> c) {
		    
		que.push(a);
		que.push(b);
		que.push(c);

		int s1 = que.top(); que.pop();
		int s2 = que.top(); que.pop();
		int s3 = que.top(); que.pop();

		if (s3*s3 + s2*s2 == s1*s1)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);

	int N;
	cin >> N;

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

	return 0;
}

C++: #include <iostream>

bool judgement(int a, int b, int c)
{
	if (a*a == b*b + c*c) {
		return true;
	} else {
		return false;
	}
}

int main()
{
    int x;
	int y;
    int z;
	bool flag[3];
	while (true) {
	    std::cin >> x >> y >> z;
	    flag[0] = judgement(x, y, z);
	    flag[1] = judgement(y, z, x);
	    flag[2] = judgement(z, x, y);
	    if (flag[0] || flag[1] || flag[2]) {
	    	std::cout << "YES" << std::endl;
	    	} else {
	    		std::cout << "NO" << std::endl;
	    		}
	   }
}

C++: #include<iostream>

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

	
	return 0;
}

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

class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*a+b*b) ans=1;
else ans=0;
};

void print(){
if(ans==0)
cout << "NO" << endl;
if(ans==1)
cout << "YES" << endl;
}

protected:
int a,b,c,ans;
};

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

using namespace std;
int main()
{
	int n;
	cin >> n;
	
	
	for(int i=0;i<n;i++){
		int a[3];
		cin >> a[0] >> a[1] >> a[2];
		sort(a,a+3);
		
			
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
			cout<< "YES" << endl;
		}else{
			cout<< "NO" << endl;
		}
	}
	return 0;
}

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

int main(){
	int T;
	cin >> T;
	while(T--){
		vector<int> v(3);
		cin >> v[0] >> v[1] >> v[2];
		sort(v.begin(),v.end());
		if( v[0]*v[0]+v[1]*v[1]==v[2]*v[2])
				cout << "YES" << endl;
		else cout << "NO" << endl;
		
	}
}

C++: import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Main {

	/**
	 * <p>
	 * 与えられた三辺で直角三角形が作れるかを判定する。
	 * </p>
	 *
	 * @param args
	 *            利用しない。
	 * @throws IOException
	 */
	public static void main(String[] args) throws NumberFormatException,
			IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int lineCount = Integer.parseInt(br.readLine());
		for (int i = 0; i < lineCount; i++) {

			String line = br.readLine();

			// 三辺の長さをリストに格納し、ソート
			List<Integer> sideList = new ArrayList<Integer>();
			String[] input = line.split(" ");
			sideList.add(Integer.parseInt(input[0]));
			sideList.add(Integer.parseInt(input[1]));
			sideList.add(Integer.parseInt(input[2]));
			Collections.sort(sideList);

			if (isRightTriangle(sideList.get(2), sideList.get(1),
					sideList.get(0))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}

	/**
	 * 三辺の長さから、直角三角形であるかどうかを判定する。<br>
	 * 注意：第一引数に最も長い辺を与えること。
	 *
	 * @param side1
	 *            辺1
	 * @param side2
	 *            辺2
	 * @param side3
	 *            辺3
	 * @return 直角三角形であるかどうか
	 */
	private static boolean isRightTriangle(int side1, int side2, int side3) {
		return (side1 * side1 == side2 * side2 + side3 * side3);
	}
}

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

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

int main()
{
    int i;
    int a[3];
    cin >> i;
    for (int n = 0; n < i; n++) {
        for (int j = 0; j < 3; j++)
            cin >> a[j];
        sort(a, a + 3);
        if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1])
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int n;
	vector<int> a(3);
	cin >> n;
	for(int i=0;i<n;i++){
		cin>>a[0]>>a[1]>>a[2];
		sort(a.begin(),a.end());
		if(a[2]*a[2]==a[0]*a[0] + a[1]*a[1]){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
}

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

using namespace std;

int main()
{
	int n;
	cin >> n;

	int a[3];
	for (int i = 0; i < n; ++i) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
			cout << "YES" << endl;
			continue;
		}
		cout << "NO" << endl;
	}
    return 0;
}