Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i := 0; i < n; i++ {
		data := nextInts(3)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

C++: #include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <iostream>
#include <set>
using namespace std;
typedef long long ll;

int N;

int main(int argc, char const *argv[]) {
	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;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, const char * argv[])
{
    int x1=0;
    int x2=0;
    int x3=0;
    int n=0;
    
    scanf("%d",&n);
    for(int i=0; i<n; i++){
        scanf("%d",&x1);
        scanf("%d",&x2);
        scanf("%d",&x3);
        if(x1*x1+x2*x2==x3*x3||x2*x2+x3*x3==x1*x1||x3*x3+x1*x1==x2*x2){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
}

C++: #include <iostream>
using namespace std;
int main(){
int ans=0;
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){
	ans=ans+1;}
		else if(b*b==a*a+c*c){
		ans=ans+1;}
		else if(c*c==a*a+b*b){
		ans=ans+1;}
	if(ans==1){
	cout<<"YES"<<endl;}
	if(ans!=1){
	cout<<"NO"<<endl;}
	}
return 0;
}

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

int main() {
	int n, a, b, c, A, B, C;

	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> a >> b >> c;
		A = a * a;
		B = b * b;
		C = c * c;

		if (A + B == C || A + C == B || B + C == A) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}

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

using namespace std;

int main()
{
	int n[1000][3];
	int len=0,m;
	cin >> m;
	while (cin >> n[len][0] >> n[len][1] >> n[len][2]) {
		n[len][0] *= n[len][0];
		n[len][1] *= n[len][1];
		n[len][2] *= n[len][2];
		len++;
	}
	for (int i = 0; i < len; i++) {
		if (n[i][0] == (n[i][1] + n[i][2]))
			cout << "YES" << endl;
		else if (n[i][1] == (n[i][2] + n[i][0]))
			cout << "YES" << endl;
		else if (n[i][2] == (n[i][0] + n[i][1]))
			cout << "YES" << endl;
		else 
			cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>

bool judge_tri(int x1, int x2, int x3);

int main()
{
	int data_num;
	std::cin >> data_num;
	while (data_num >= 1) {
		int x1, x2, x3;
		std::cin >> x1 >> x2 >> x3;
		if (judge_tri(x1, x2, x3)) {
			std::cout << "YES" << std::endl;
		} else {
			std::cout << "NO" << std::endl;
		}
		data_num--;
	}
	return 0;
}

bool judge_tri(int x1, int x2, int x3)
{
	bool result;
	if (x1 * x1 == x2 * x2 + x3 * x3) {
		result = true;
	} else if (x2 * x2 == x3 * x3 + x1 * x1) {
		result = true;
	} else if (x3 * x3 == x1 * x1 + x2 * x2) {
		result = true;
	} else {
		result = false;
	}
	return result;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <math.h>
#include <vector>
#include <queue>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
using namespace std;
#define rep(I,N) for(int I = 0; I < (int)(N); I++)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;

int main(void){
	int N;
	cin >> N;
	rep(k, N){
		int a, b, c;
		cin >> a >> b >> c;
		a = pow(a, 2);
		b = pow(b, 2);
		c = pow(c, 2);
		bool flag = false;
		if(sqrt(c) == sqrt(a + b))flag = true;
		if(sqrt(b) == sqrt(a + c))flag = true;
		if(sqrt(a) == sqrt(b + c))flag = true;
		if(flag)cout << "YES"<<endl;
		else FIN("NO");

	}

	return 0;	
}

C++: #Include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

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

    vector<vector<int>> triangles;
    
    int n;
    cin >> n;
    
    REP(i, 0, n) {
        vector<int> tmp;
        int a, b, c;
        cin >> a >> b >> c;
        tmp.push_back(a);
        tmp.push_back(b);
        tmp.push_back(c);
        
        sort(tmp.begin(), tmp.end());
        triangles.push_back(tmp);
    }

    for(auto sides : triangles) {
        if (sides[2] * sides[2] == sides[0]*sides[0]+sides[1]*sides[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

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

using namespace std;

int main(){
        int a, b, c, i;
        bool ans = false;
        while(scanf("%d%d%d", &a, &b, &c) != EOF){ 
                ans = false;
                if(a * a + b * b == c * c)
                        ans = true;
                if(b * b + c * c == a * a)
                        ans = true;
                if(c * c + a * a == b * b)
                        ans = true;
                printf("%s\n", ans ? "YES" : "NO");
        }
        return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <iomanip>
#include <queue>
using namespace std;


int GetDigit(int n){
	int i = 0;

	while(n > 0){
		n /= 10;
		i++;
	}

	return i;
}
 
int main(){
	vector<int> a(3);
	int n, tmp;

	cin >> n;

	for(int i = 0; i < n; i++){
		for(int j = 0; j < 3; j++){
			cin >> a[j];
		}
		sort(a.begin(), a.end());

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

	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n=1;
	int i=0;
	int a,b,c;
	int irekae=0;
		scanf("%d",&n);
			for (i=0;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");
				}
			}
}

C++: #include<stdio.h>
#include<iostream>

using namespace std;


int main(){
	int n;
	cin>>n;
	int hen1,hen2,hen3,saidai,max_pos=1;

	for(int i=0;i<n;i++){
		cin>>hen1>>hen2>>hen3;

		saidai=hen1;
		if(saidai<hen2){
			saidai=hen2;
			max_pos=2;
		}
		if(saidai<hen3){
			saidai=hen3;
			max_pos=3;
		}
		switch(max_pos){
		case 1:
			hen1=0;
			break;
		case 2:
			hen2=0;
			break;
		case 3:
			hen3=0;
			break;
		}
		if(saidai*saidai==(hen1*hen1+hen2*hen2+hen3*hen3))
			cout<<"YES"<<"\n";
		else{
			cout<<"NO"<<"\n";
		}
	}
	
	
	return 0;
}

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

int main(){ 
    int a,b,c,s;
    string res;

    cin >> s;
    while(s>0){
        cin >> a >> b >> c; 
        a = a*a;
        b = b*b;
        c = c*c;
        res = "YES";
        if(a!=(b+c) && b!=(a+c) && c!=(a+b)) res="NO";
        cout << res << endl;
        s--;    
    }
    return 0;
}