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>

void judge_right_triangle(int a, int b, int c);

int main(void)
{
    int number;
    scanf("%d", &number);
    for (int i = 0; i < number; ++i) {
        int a;
        int b;
        int c;
        scanf("%d %d %d", &a, &b, &c);
        judge_right_triangle(a, b, c);
    }
    return 0;
}
void judge_right_triangle(int a, int b, int c)
{
    if (a * a + b * b == c * c) {
        printf("YES\n");
        return;
    }
    if (b * b + c * c == a * a) {
        printf("YES\n");
        return;
    }
    if (c * c + a * a == b * b) {
        printf("YES\n");
        return;
    }
    printf("NO\n");
    return;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    vector<int> a(3);
    int N;
    cin >> N;
    while (N--) {
        for (int i = 0; i < 3; i++) {
            cin >> a[i];
        }
        sort(a.begin(), a.end());
        cout << (a[0]*a[0] + a[1]*a[1] == a[2]*a[2] ? "YES" : "NO") << endl;
    }
    return 0;
}

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

C++: #include<iostream>
using namespace std;
int main(){
	int a,b,c,d,time;
	cin>>time;
	for(int abc=0;abc<time;abc++){
		cin>>a>>b>>c;
		if(a>b){
			d=a;
			a=b;
			b=d;
		}
			if(b>c){
			d=b;
			b=c;
			c=d;
		}
		if(a>b){
			d=a;
			a=b;
			b=d;
		}
		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 main(void){
	int x[3];
	cin >> x[1];
	string n = "NO", y = "YES";
	while(cin >> x[0] >> x[1] >> x[2]){
		sort(x,x + 3);
		if(x[2] <= x[1] + x[0])
			cout << y << endl;
		else
			cout << n << endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n=0;
	int i=0;
	int a,b,c;
	int irekae=0;
	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		scanf("%d",&a);
		scanf("%d",&b);
		if (a<b)
		{
			irekae=a;
			a=b;
			b=irekae;
		}
		scanf("%d",&c);
		if (a>c)
		{
			irekae=a;
			a=c;
			c=irekae;
		}
		if (c*c==a*a+b*b)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	return 0;
}

C++: #include<stdio.h>
int main()
{
    int a,b,c,n,i;
    while(scanf("%d",&n)){
    for(i=1;i<=n;i++)
    {
        scanf("%d%d%d",&a,&b,&c);
        if(a*a+b*b==c*c) printf("YES\n");
        else printf("NO\n");
    }}
    return 0;
}

C++: #include <stdio.h>

void right_triangle(int a, int b, int c)
{
    if ((a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a)) {
        printf("YES\n");
    }
    else {
        printf("NO\n");
    }
}

int main(void)
{
    int n, a, b, c;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%d %d %d", &a, &b, &c);
        right_triangle(a, b, c);
    }    
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <set>

using namespace std;

#define ALL(co) co.begin(), co.end()

typedef long long LL;
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> Array;
typedef vector<int> LArray;

const int INF = 1 << 29;
const LL LINF = 1LL << 60;

int itiv;
inline int getInt() { return (cin >> itiv, itiv); }
void readAll(Array& vec, int n) { for (int i = 0; i < n; i++) cin >> vec[i]; }
inline bool between(int first, int last, int n) { return first <= n && n <= last; }
inline bool inRange(int begin, int end, int n) { return begin <= n && n < end; }
inline bool inRange(int size, int n) { return 0 <= n && n < size; }

int m, n;
int dx[] = { -1, 0, 1, 0 }, dy[] = { 0, -1, 0, 1 };
int dr[] = { 0, -1, 0, 1 }, dc[] = { -1, 0, 1, 0 };


int main(void)
{
	while(cin >> n && n)
	{
		for (int i = 0; i < n; i++)
		{
			vector<int> arr(3);
			for (int i = 0; i < 3; i++)
			{
				cin >> arr[i];
			}
			sort(ALL(arr));
			cout << (arr[2] * arr[2] == arr[0] * arr[0] + arr[1] * arr[1] ? "YES" : "NO") << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a;
    cin >> a;
    for (int i=0;i<a;i++){
        int x,y,z;
        cin >> x >> y >> z;
        if (x^2+y^2!=z^2 && x^2+z^2!=y^2 && y^2+z^2!=x^2)
            cout << "NO" << endl;
        else
            cout << "YES" << endl;
    }
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <sstream>

using namespace std;


vector<string> splitString(const string& str, const string& separator = " ") {
	vector<string> ret;

	std::size_t bp, ep;
	bp = ep = 0;
	while((ep = str.find_first_of(separator, bp)) != string::npos){
		if(bp != ep){
			ret.push_back(string(str.begin() + bp, str.begin() + ep));
		}
		bp = ep + 1;
	}

	if(bp <= str.size() - 1){
		ret.push_back(string(str.begin() + bp, str.end()));
	}

	return ret;
}

template <class T>
T convertStringToNumber(const string& str) {
	stringstream ss;
	T ret;

	ss << str;
	ss >> ret;

	return ret;
}


void inputData(vector<string>& data_set) {
	string buffer;

	getline(cin, buffer);
	int n = convertStringToNumber<int>(buffer);

	for(int i = 0; i < n; ++i) {
		getline(cin, buffer);
		data_set.push_back(buffer);
	}
}

bool isRightTriangle(const vector<int>& edge_set) {
	int max_index = 0;

	if(edge_set[max_index] < edge_set[(max_index+1)%3])
		max_index = (max_index+1)%3; 
	if(edge_set[max_index] < edge_set[(max_index+2)%3])
		max_index = (max_index+2)%3; 

	return ((edge_set[max_index] * edge_set[max_index]) ==
				(edge_set[(max_index+1)%3] * edge_set[(max_index+1)%3]
				+ edge_set[(max_index+2)%3] * edge_set[(max_index+2)%3]));
}


vector<bool> evaluateTriangle(const vector<string>& data_str) {
	vector<bool> ret(data_str.size());

	for(int i = 0; i < data_str.size(); ++i) {
		auto temp = splitString(data_str[i]);
		vector<int> buff { convertStringToNumber<int>(temp[0]),
							convertStringToNumber<int>(temp[1]),
							convertStringToNumber<int>(temp[2])};

		ret[i] = isRightTriangle(buff);
	}

	return ret;
}


void doAllProcess() {
	vector<string> buffer;

	inputData(buffer);

	vector<bool> ret = evaluateTriangle(buffer);

	for(int i = 0; i < ret.size(); ++i)
		std::cout << (ret[i] ? "YES" : "NO") << std::endl;
}



int main() {
	doAllProcess();

	return 0;
}

C++: #include<cstdio>
#include<algorithm>
int main(void)
{
	int a,s,d,f,g,h,i,j;
	scanf("%d",&f);
	for(i=0;i<f;i++){
		scanf("%d %d %d",&a,&s,&d);
		if(a*a==s*s+d*d||d*d==s*s+a*a||s*s==d*d+a*a)
			printf("YES\n");
		else
			printf("NO\n");
	}
	return 0;
}