Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"sort"
	"strconv"
	"strings"
)

func sliceAtof64(sa []string) ([]float64, error) {
	si := make([]float64, 0, len(sa))
	for _, a := range sa {
		i, err := strconv.ParseFloat(a, 64)
		if err != nil {
			return si, err
		}
		si = append(si, i)
	}
	return si, nil
}

func answer(ans bool) {
	if ans {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
func isRightTriangle(ary []float64) (ans bool) {
	sort.Sort(sort.Reverse(sort.Float64Slice(ary)))
	ans = math.Pow(ary[1], 2.0)+math.Pow(ary[2], 2.0) == math.Pow(ary[0], 2.0)

	return
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	lineCount, _ := strconv.Atoi(scanner.Text())
	lines := make([]string, lineCount)

	for i := 0; i < lineCount; i++ {
		scanner.Scan()
		lines[i] = scanner.Text()
	}

	for _, v := range lines {
		ary, _ := sliceAtof64(strings.Split(v, " "))
		answer(isRightTriangle(ary))
	}
}

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

using namespace std;

int main(){

int n;
cin>>n;

for(int i=0;i<n;i++){
int tri[3];

cin>>tri[0]>>tri[1]>>tri[2];
sort(tri,tri+3);

if(tri[0]%1==0 && tri[1]%1==0 && tri[2]%2==0) cout<<"YES"<<endl;
else if(tri[0]%1==0 && tri[1]%3==0 && tri[2]%4==0) cout<<"YES"<<endl;
else if(tri[0]%3==0 && tri[1]%4==0 && tri[2]%5==0) cout<<"YES"<<endl;
else if(tri[0]%5==0 && tri[1]%12==0 && tri[2]%13==0) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}

return 0;

}

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

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        if( (( (a^2) + (b^2) ) == (c^2)) ){
            Result[Ncount] = "Yes";
        }else{
            Result[Ncount] = "NO";
        }
    }
    
    //??????????????????????????¨???Yes or No?????????
    for(int Ncount=0;Ncount < N;Ncount++){
        printf("%s\n",Result[Ncount]);
    }
    
}

C++: main(a,b,c){
	for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts(((a+b-c)&&(b+c-a)&&(a+c-b))?"NO":"YES"))a*=a,b*=b,c*=c;
	exit(0);
}

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

class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*a+b*b) ans=1;
else ans=0;
};

void print(){
if(ans==0)
cout << "NO" << endl;
if(ans==1)
cout << "YES" << endl;
}

protected:
int a,b,c,ans;
};

C++: #include <iostream>

int main(int argc, char **argv) {
	int num, i, a, b, c;
	
	std::cin >> num;
	
	for(i = 0; i < num; i++) {
		std::cin >> a >> b >> c;
		if (a*a + b*b == c*c &&
		    b*b + c*c == a*a &&
			c*c + a*a == b*b) {
			std::cout << "YES" << std::endl;
		} else {
			std::cout << "NO" << std::endl;
		}
	}
}

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

C++: 3
4 3 5
4 3 6
8 8 8

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

int main(){
	int n, a, b, c;
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		scanf("%d%d%d", &a, &b, &c);
		if ((a > b || a == c)&& b > c){
			if (a * a == b * b + c * c)
				std::cout << "YES\n";
			else
				std::cout << "NO\n";
		}
		else if ((a < b || a == c) && b > c){
			if (a * a + c * c == b * b)
				std::cout << "YES\n";
			else
				std::cout << "NO\n";
		}
		else if ((a < b || a == b) && b < c){
			if (a * a + b * b == c * c)
				std::cout << "YES\n";
			else
				std::cout << "NO\n";
		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int T;
	scanf("%d",&T);
	while(T--){
		int a,b,c;
		scanf("%d %d %d",&a,&b,&c);
		if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a) puts("YES");
		else puts("NO");
	}
}

C++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][1000];
int y = 0;
int temp = 0;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];

}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<10;looper2++)
{
    if((panjang[looper][y+1])<(panjang[looper][y+2]))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;
            if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
    }
    }

}

cout << endl;
}
for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << "YES" << endl;
    else cout << "NO" << endl;
}


}

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

using namespace std;

int main(){
  int num, a, b, c, a2, b2, c2;
  cin>>num;

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

    a2= a*a;
    b2= b*b;
    c2= c*c;

    if((a2+b2==c2)||(b2+c2==a2)||(a2+c2==b2)){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int a,b,c,d;

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

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

int main(void) {
	int n=0;
	vector<string> r;
	cin >> n;
	for (int i=0; i<n; i++)
	{
		int a=0,b=0,c=0;
		scanf("%d %d %d",&a,&b,&c);
		if ((a*a+b*b==c*c)||(b*b+c*c==a*a)||(c*c+a*a==b*b))
		{
			r.push_back("YES");
		} else {
			r.push_back("NO");
		}
	}
	for (int i=0; i<n; i++)
	{
		cout << r[i] << endl;
	}
	return 0;
}

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

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

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

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

void solve(int a,int b, int c){
	a*=a; b*=b; c*=c;
	if(a+b==c) cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
}

int main() {
	int a,b,c,N;
	cin>>N;
	for(;N>0;N--){
		cin>>a>>b>>c;
		if(a<c && b<c) solve(a,b,c);
		else if(a<b && c<b) solve(a,c,b);
		else solve(b,c,a);
	}
	return 0;
}

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

int main()
{
	int i;
	int n;
	int a, b, c;
	scanf("%d",&n);
	
	for(i = 0; i <n; i++){
		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){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	
	return 0;
}