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 <iostream>
#include <cmath>
using namespace std;
int main() {

    int test, side1, side2, side3;

    scanf("%d",&test);
    for( int i = 1 ; i <= test ; i++ ) {
        scanf("%d %d %d",&side1,&side2,&side3);
        if(side1 == sqrt((side2)*(side2) + (side3)*(side3)))
            printf("YES\n");
        else if(side2 == sqrt((side1)*(side1) + (side3)*(side3)))
            printf("YES\n");
        else if(side3 == sqrt((side1)*(side1) + (side2)*(side2)))
            printf("YES\n");
        else printf("NO\n");
    }

    return 0;
}

C++: #include <cstdio>

int main(){
	int n;
	long long a[1010],b[1010],c[1010];

	scanf("%d",&n);

	for(int i =1;i<=n;i++){
		scanf("%d %d %d",&a[i],&b[i],&c[i]);
	}

	for(int j =1;j<=n;j++){
		if((c[j]*c[j]) == ((a[j]*a[j])+(b[j]*b[j]))){
			printf("YES\n");
		}else{
			printf("NO");
		}
	}
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
  int N;
  vector<int>a(3);
  cin >> N;
  for(int i=0;i<N;i++){
    cin >>a.at(0)>>a.at(1)>>a.at(2);
    //cout <<a.at(0)<<a.at(1)<<a.at(2)<<endl;
    sort(a.begin(),a.end());
    if((a.at(0)*a.at(0)+a.at(1)*a.at(1))==a.at(2)*a.at(2)){
      cout <<"YES"<<endl;
    }
    else{
      cout <<"NO"<<endl;
    }
    //cout <<a.at(0)*a.at(0)<< a.at(1)*a.at(1)<<a.at(2)*a.at(2)<<endl;
  }
    return 0;
}

C++: //
//  main.cpp
//  ag
//
//  Created by h3037175 on 2017/07/28.
//  Copyright ?? 2017??´ h3037175. All rights reserved.
//

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

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

int main()
{
	int ia, ib, ic, iN;
	int TrueFlag[1000];

	while( cin >> iN ){
		
		for( int i=0;i<iN;i++ ){

			cin >> ia >> ib >> ic;

			if( (ia*ia) + (ib*ib) == (ic*ic) )
				TrueFlag[i] = 1;
			else
				TrueFlag[i] = 0;

		}

		for( int i=0;i<iN;i++ ){

			if( TrueFlag[i] == 1 )
				cout << "YES" << endl;
			else
				cout << "NO" << endl;

		}

	}

	return 0;
}

C++: #include<stdio.h>
int main(){
	int n,k[100]={ 0 };
	int a,b,c;
	int i,j;
	
	scanf("%d",&n);
	for(i=0;i<n;){
		scanf("%d %d %d",&a,&b,&c);
		if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==b*b+a*a){k[i]=1;}
		else{}
		i++;
	}
	for(i=0;i<n;i++){
		switch(k[i]){
			case 1:
				printf("YES\n");
				break;
			case 0:
				printf("NO\n");
				break;
			default:
				break;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a, b, c;
	while(cin >> a >> b >> c){
		if((a * a) + (b * b) == (c * c) ||(b * b) + (c * c) == (a * a) || (b * b) + (c * c) == (a * a)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return(0);
}

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

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

  while(n--){
    int a, b, c;
    cin >> a >> b >> c;
    a *= a;
    b *= b;
    c *= c;

    if(a + b == c || a + c == b || b + c == a){
      cout << "YES\n";
    }
    else{
      cout << "NO\n";
    }
  }
}

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

int main() {
/*	int a[3];
	cin >> a[0] ;
	a[1] = 3;
	a[2] = a[0] * 10;

	cout << a[0] <<" " << a[1] <<" "<< a[2] << endl;
	
	for (int i = 0; i < 3; i++) {
		cout << a[i] << endl;
	}


	sort(a,a+5);
*//*
	int a[10];
	for (int i = 0; i < 10; i++) {
		cin >> a[i];
	}
	
	sort(a,a+10,greater<int>());

	for (int i = 0; i < 3; i++) {
		cout << a[i]<<endl;
	}

	int ans = 0;
	int a, b,c;
	while(cin>>a>>b) {
		ans = 0;
		c = a + b;

		if ( c==0   ) {
			ans = 1;
		}
		else{
			while (c > 0) {
				c /= 10;
				ans++;
			}
		}
		cout << ans << endl;
	}*/

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

	return 0;;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;
int main() {
	int d[3],N;
	scanf("%d",&N);
	for(int i=0;i<N;i++) {
		scanf("%d %d %d",&d[0],&d[1],&d[2]);
		sort(d,d+3);
		printf("%s\n",d[2]*d[2]==d[1]*d[1]+d[0]*d[0]?"YES":"NO");
	}
}

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

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	int max_num = max(a, max(b, c));
	int sub1, sub2;
	if (max_num != a) {
		sub1 = a;
		if (max_num != b) sub2 = b;
		else sub2 = c;
	} else if (max_num != b) {
		sub1 = b;
		sub2 = c;
	} 		
	if (pow(max_num, 2) == pow(sub1, 2) + pow(sub2, 2)) f = true;
	if (f) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main() {
	int num, a, b, c;
	cin >> num;
	for (int i=0; i<num; i++) {
		cin >> a >> b >> c;
		solve(a,b,c);
	}
	return 0;
}

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

int main()
{
int T;
scanf("%d",&T);
for(int t=0;t<T;t++){
int edge[3];
scanf("%d %d %d",edge,edge+1,edge+2);
sort(edge,edge+3,greater<int>());
if(edge[0]*edge[0]==edge[1]*edge[1]+edge[2]*edge[2]){
printf("%s\n","YES");
}else{
printf("%s\n","NO");
}
}

return 0;
}

C++: #include <iostream>
using namespace std;
int n;
int main()
{
	cin >> n;
	int i,a[1000],b[1000],c[1000],x[1000],y[1000],z[1000],res[1000];
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		x[i] = a[i];
		if (x[i] < b[i]) {
			y[i] = x[i];
			x[i] = b[i];
		}
		else {
			y[i] = b[i];
		}
		if (x[i] < c[i]) {
			z[i] = y[i];
			y[i] = x[i];
			x[i] = c[i];
		}
		else if (y[i] < c[i]) {
			z[i] = y[i];
			y[i] = c[i];
		}
		else {
			z[i] = c[i];
		}
	}
	for (i = 0; i < n; i++) {
		res[i] = x[i] * x[i] - z[i] * z[i] - y[i] * y[i];
		if (res[i] == 0) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

    return 0;
}

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

using namespace std;

int pitagoras(int a,int b,int c){
	if(pow(a,2)+pow(b,2) == pow(c,2))
		return 1;
	if(pow(b,2)+pow(c,2) == pow(a,2))
		return 1;
	if(pow(c,2)+pow(a,2) == pow(b,2))
		return 1;
	return 0;
}
int main(){
	int num,i;
	int a[1000],b[1000],c[1000];
	cin >> num;
	for(i = 0; i < num; i++)
		cin >> a[i] >> b[i] >> c[i];
		for(i = 0; i < num; i++){
			if(pitagoras(a[i],b[i],c[i])==1)
				cout << "YES" << endl;
			if(pitagoras(a[i],b[i],c[i])==0)
				cout << "NO"  << endl;
		}
}