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>
using namespace std;

int main(){
    int length[3];
    int n,A,B,C;
    cin >> n;
 
    for(int i=0;i<n;i++){
        cin >> length[0] >> length[1] >> length[2];       
        A = length[0] * length[0];
        B = length[1] * length[1];
        C = length[2] * length[2];
        if(A+B==C||B+C==A||C+A==B){
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl;
        }
    }
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <set>
#include <map>
#define INF 100000
using namespace std;

int main(){
    int n;
    cin >> n;
    for (int i=0; i<n; i++) {
        vector<int> sa;
        for (int j=0; j<3; j++) {
            int inp;
            cin >> inp;
            sa.push_back(inp);
        }
        sort(sa.begin(), sa.end());
        if (sa[0]*sa[0]+sa[1]*sa[1]==sa[2]*sa[2]) {
            cout << "YES"<<endl;
        }else{
            cout << "NO"<<endl;
        }
    }
    
}

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

int main() {
int a,b,c,i;
cin>>i;
for(int n=0; n<i; n++){
cin>>a>>b>>c;


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

// your code goes here
	return 0;
}

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

C++: //clang 3.8.0

#include  <stdio.h>

int main(void)
{
    int *a, *b, *c;
    int n, i, temp;
    
    scanf("%d", &n);
    
    a = (int *)malloc(sizeof(int) * n);
    b = (int *)malloc(sizeof(int) * n);
    c = (int *)malloc(sizeof(int) * n);
    
    for(i = 0; i < n; i ++){
        scanf("%d %d %d", &a[i], &b[i], &c[i]);
        
        if(a[i] > b[i]){
            if(a[i] > c[i]){
                temp = c[i];
                c[i] = a[i];
                a[i] = temp;
            }else{
                //no_problem
            }
        }else if(b[i] > c[i]){
            temp = c[i];
            c[i] = b[i];
            b[i] = temp;
        }else{
            //no_problem
        }
    }
    
    for(i = 0; i < n; i ++){
        printf("%s\n", (a[i] * a[i] + b[i] * b[i] == c[i] * c[i]) ? ("Yes") : ("No"));
    }
    
    free(a); free(b); free(c);
}

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

C++: #include <iostream>
#include <cstdio>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        if( ((a*a) + (b*b))  == (c*c) ){ 
            printf("YES\n"); 
        }else if( (b*b) + (c*c)  == (a*a) ){
            printf("YES\n"); 
        }else if( (c*c) + (a*a)  == (b*b) ){ 
            printf("YES\n"); 
        }else{ 
            printf("NO\n"); 
        }
    }
}

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

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

using namespace std;

int main()
{
	int a, b, c, n, i;
	int ans;
	
	cin >> n;
	for(i = 0; i < n; i++)
	{
		cin >> a >> b >> c;
		
		if(a > b && a > c)
		{
			ans = a * a - b * b - c * c;
			
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			
			else
			{
				cout << "NO" << endl;
			}
		}
		
		
		
		if(b > c && b > a)
		{
			ans = b * b - c * c - a * a;
		
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			
			else
			{
				cout << "NO" << endl;
			}
		}
		
		else
		{
			ans = c * c - a * a - b * b;
			
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			
			else
			{
				cout << "NO" << endl;
			}
		}
	}

		return 0;
}

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

using namespace std;

int main(){
	
    int n;
    
    while( cin >> n ) {
    
    while( n-- ) {
    	
    	int L[3];
    	
    	for(int i=0;i<3;i++)
    	cin >> L[i];
	
		sort(L, L+3);
		
		if( L[0] * L[0] + L[1] * L[1] == L[2] * L[2] )
		cout << "YES\n";
		
		else
		cout << "NO\n";
	}
	}
    return 0;
}

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

int main(){
	int n,a,b,c;
	cin>> n;
	for(;n>0;n--){
	cin>> a>> b>> c;
	if(a*a+b*b==c*c){
		cout<< "YES"<<endl;
	}
	else if(b*b+c*c==a*a){
		cout<< "YES"<<endl;
	}
	else if(c*c+a*a==b*b){
		cout<< "YES"<<endl;
	}
	else{
		cout<< "NO"<<endl;
	}
	}
	return 0;
}

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

int main(){
  int N,i,a,b,c;

  scanf("%d",&N);
  for(i = 0;i<N;i++){
    cin >> a >> b >> c;
    a*=a;
    b*=b;
    c*=c;
    if(a+b==c||b+c==a||a+c==b)cout << "YES" << endl;
    else cout << "NO" << endl;

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

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

C++: #include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <limits.h>
#include <cctype>

#include <iostream>
#include <vector>
#include <deque>
#include <queue>
#include <map>
#include <algorithm>


using namespace std;

#define Max INT_MAX
#define Inf (INT_MAX/2)
#define Min INT_MIN


#define rep(i, n) for(int i = 0; i < n; i++)
#define repi(i,l,n) for(int (i)=(int)(l);(i)<(int)(n);(i)++)
// s <= x < g ?
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
// 0 <= x < w && 0 <= y < h ?
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))

typedef pair<int, int> P;

int main()
{
    int N;
    cin >> N;
    rep(i,N){
        int a,b,c;
        int d[3];
        cin >> a >> b >> c;
        d[0] = a;
        d[1] = b;
        d[2] = c;
        sort(d, d+3);
        if( pow(d[0],2) + pow(d[1],2) == pow(d[2],2) ){
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}