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 <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int long long i=0;i<n;i++)
using namespace std;
char t[7];
int main(){
    int n;
    cin>>n;
    while(n>0){
    vector<int> v(3);
    rep(i,3){
        int x;
        cin>>x;
        v.push_back(x);
    }
    sort(v.begin(),v.end(),greater<int>());
    if(v[0]==sqrt(v[1]*v[1]+v[2]*v[2])){
        cout<<"YES";
    }else{
        cout<<"N0";
    }
if(n!=0)cout<<endl;
        n--;
    }
    
    return 0;
}

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

int main()
{
	int n;
	int side[3];

	cin >> n;

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

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

	int stop;
	cin >> stop;

    return 0;
}

C++: #include <iostream>
using namespace std;
  
  
int main()
{
      int a,b,c,n,index;
  
      index = 0; 
      cin >> n; 
      while(1)
      {
           cin >> a >> b >> c;       
           if( (a*a + b*b) == c*c)     
                   cout >> "Yes" >> endl;
           else
                   cout >> "No" >> endl;
       
          if(index == n)
                   break;     
  
          index++;
     }
  
     return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(a); V.push_back(b); V.push_back(c);
        std::sort(V.begin(), V.end());
        if (pow(V[2], 2) == pow(V[0], 2) + pow(V[1], 2)) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}

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

using namespace std;

int main(){
	int n,i,a,b,c,t;

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

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
#define FOR(i,n) for(i=0;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

int main(){
	int n,a,b,c;
	cin>>n;
	rep(i,n){
		cin>>a>>b>>c;
		cout<<(a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b?"YES":"NO")<<endl;
	}
	return 0;
}

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

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	long int rec,i,j,t;
	int count=0;
	long int n[3]={0,0,0};
	
	scanf("%ld",&t);
	
	for(i=0;i<t;i++){
		for(j=0;j<3;j++){
			scanf("%ld",&rec);
			if(rec==0){
				count=1;
			}
			if(rec>n[0]){
				n[2]=n[1];
				n[1]=n[0];	
				n[0]=rec;
			}else if(rec>n[1]){
				n[2]=n[1];
				n[1]=rec;
			}else if(rec>n[2]){
				n[2]=rec;
			}
		}
		if(count=1){
			printf("NO\n");
		}else if(n[0]*n[0]==n[1]*n[1]+n[2]*n[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <ctime>
#include <iterator>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;


int main()
{
    int nb_cas;
    cin>>nb_cas;
    while(nb_cas--)
    {
        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++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cmath>

using namespace std;



int main()
{
	int num;
	int a, b, c;

	cin >> num;

	//cin >> a >> b >> c;

	while (cin >> a >> b >> 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");
	}

		return (0);
	
}

C++: #include<iostream>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<string>
#include<queue>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<fstream>
#include<sstream>
using namespace std;
vector<long>trn;
int main()
{
    long test,i,a,b,c;

      cin>>test;
     for(i=0;i<test;i++)
     {
         cin>>a>>b>>c;
         trn.push_back(a);
         trn.push_back(b);
         trn.push_back(c);
         sort(trn.begin(),trn.end());

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

          trn.clear();
     }



    return 0;
}

C++: //#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
//#include <cstdio>
//#include <cstdlib>
//#include <cmath>
#include <iostream>
#include <algorithm>
//#include <cstring>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>
#include <set>
using namespace std;

int main(void){

	int N;
	
	cin >> N;
	
	for(int i = 0; i<3;i++){
		int a, b, c;
		cin >> a >> b >> c;
		if(a > b) swap(a, b);
		if(a > c) swap(a, c);
		if(b > c) swap(b, c);
		
		if(a * a + b * b == c * c) cout << "Yes" <<endl;
		else cout << "No" << endl;
		
	}

	return 0;
}

/*
for(i=0;i<N;i++){
	cin >> X[i];
}


for(i=0;i<N;i++){
	for(j=0;j<N;j++){
		cin >> X[i][j];
	}
}
*/

C++: #include <iostream>
using namespace std;
int main()
{
	
    int a[100],b[100], c[100];	
	int x=0;
	int n;

	while(true){
		cin >> n;

		if(n==0)
			break;
		for(int i=0 ;i<n ;i++){
            
     		cin >> a[i] >> b[i] >> c[i];

	    	if(a[i]<b[i]){
		    	x=a[i];
			    a[i]=b[i];
		    	b[i]=x;
		    }
		    if(b[i]<c[i]){
		    	x=b[i];
	     		b[i]=c[i];
		    	c[i]=x;
		    }
		    if(a[i]<b[i]){
		    	x=a[i];
			    a[i]=b[i];
			    b[i]=x;
	    	}
            a[i] = a[i]*a[i];
		    b[i] = b[i]*b[i];
		    c[i] = c[i]*c[i];
		}
		for(int i=0 ;i<n ;i++){
		    

     		if(a[i]==b[i]+c[i])
	    		cout << "YES" << endl;
		    else
			    cout << "NO" << endl;
		}  
	        
	}
 return 0;
}