Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>
using namespace std;
typedef long long int ll;

int main(){
	int n; cin >> n;
	int a,b,c;
	while(scanf("%d %d %d",&a,&b,&c)!=EOF){
		if(a>c)swap(a,c);
		if(a>b)swap(a,b);
		if(b>c)swap(b,c);
		if(a*a+b*b==c*c)cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}

C++: #include <iostream>

using namespace std;

int main(){
    int N;
    cin>>N;
    if(cin.eof())return 0;

    while(N--){
        int x,y,z;
        cin>>x>>y>>z;
        if((x^2+y^2)==(z^2)||(x^2+z^2)==(y^2)||(y^2+z^2)==(x^2))cout<<"YES\n";
        else cout<<"NO\n";
    }
}

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


int main()
{
	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||a*a+c*c==b*b||b*b+c*c==a*a){
			cout<<"yes"<<endl;
		}
		else
			cout<<"no"<<endl;
	}
	return 0;
}

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

int main(){
	int N;
	int a, b, c;
	int s;
	
	scanf("%d", &N);
	for(int i = 0; i < N; i++){
		scanf("%d%d%d", &a, &b, &c);
		a = a * a; b = b * b; c = c * c;
		
		if(a < b){
			s = a; a = b; b = s;
		}
		if(a < c){
			s = a; a = c; c = s;
		}
		
		if(a == b + c) printf("YES\n");
		else printf("NO\n");
	}
	
	return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j<n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0]){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
}

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

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

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

void rate() {
int x, y, z;
	cin >> x >> y >> z;
	if (x*x + y*y == z*z || y*y + z*z == x*x || z*z + x*x == y*y) {
		cout << "YES\n";
	}
	else {
		cout << "NO\n";
	}

}

int main() {
	int i, k;
		cin >> k;
		for (i = 1; i <= k; i = i + 1) {
			rate();
		}
	
	return 0;
}

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

#define upper 1000
#define lower 1
#define eN 1000

using namespace std;

bool check(int e1, int e2, int e3){
	if (((e1*e1)+(e2*e2)) == (e3*e3)){
		return true;
	}
	else{
		false;
	}
}

int main(void){
	int N;
	cin >> N;

	vector<bool> result;

	for (int i=0; i<N; ++i){
		int e1, e2, e3;
		vector<int> len;
		cin >> e1 >> e2 >> e3;
		len.push_back(e1);
		len.push_back(e2);
		len.push_back(e3);
		sort(len.begin(), len.end());
		result.push_back(check(len[0],len[1],len[2]));
	}
	for (int i=0; i<N; ++i){
		if (result[i] == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

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

int main(void)
{

	int a,b,c;
	int n;

	scanf("%d", &n);
	while(n--, n >= 0){
		scanf("%d %d %d", &a, &b, &c);

		a *=a;
		b *=b;
		c *=c;

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


	return 0;
}

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


    return 0;
}

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

int main(void)
{
	int16_t data_num = 0;
	int16_t first = 0;
	int16_t second = 0;
	int16_t third = 0;
	
	std::cin >> data_num;


	std::array<int16_t, 3> sides;

	for (int i = 0; i < data_num; i++)
	{
		std::cin >> sides[0] >> sides[1] >> sides[2];

		std::sort(sides.begin(), sides.end());
		
		if ( std::pow(sides[2], 2) == (std::pow(sides[0], 2) + std::pow(sides[1], 2)) )
		{
			std::cout << "YES" << std::endl;
		}
		else
		{
			std::cout << "NO" << std::endl;
		}
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
    int a , b , c ,test;

    cin>>test;

    for(int i{0};i<test;i++){
        cin>>a>>b>>c;

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

    }

    return 0;
}

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

int main(){
	int n, a, b, c;
	
	cin >> n;
	while(n--){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(y*y + z*z == x*x)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	
    return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main()
{
	/*FILE *a;
	char b[20],op;
	int p,cod,caso;
	float c;
	do
	{
		fflush(stdin);
		cout<<"\nLa Cato S.A"<<endl;
		cout<<"\nA.Crear archivo.\nB.Ingresar Cliente. \nC.Mostrar Clientes. \nD.Salir del programa"<<endl;
		cin>>op;
		switch (op)
		{
		case 'A':
				a=fopen("La cato.txt","w");
				cout<<"\nARCHIVO CREADO"<<endl;
				break;
		case 'B':
			if(fopen("La cato.txt","w")==NULL)
				cout<<"NO HA CREADO ARCHIVO PRIMERO"<<endl;
			if(caso!=0)
				a=fopen("La cato.txt","a");
			do
			{
				p=0;
				fflush(stdin);
				puts("\nINGRESE NOMBRE: ");
				gets(b);
				for(int j=0;j<strlen(b);j++)
				{
					if(b[j]!=' '&&(b[j]<'A'||b[j]>'Z'))
					{
						fflush(stdin);
						cout<<"HAY LETRAS NO MAYUSCULAS"<<endl;
						p=1;
						break;
					}
				}
			}while(p);
			fflush(stdin);
			fprintf(a,"%s    ",b);
			do
			{
				cout<<"INGRESE CODIGO"<<endl;
				fflush(stdin);
				cin>>cod;
			}while(cod<100000||cod>999999);
			fprintf(a,"%d    ",cod);
			for(int i=0;i<3;i++)
			{
				fflush(stdin);
				do
				{
					cout<<"INGRESE PRECIO "<<i+1<<endl; //INGRSAMOS precios
					fflush(stdin);
					cin>>c;
					if(c<0)
						cout<<"ERROR, NEGATIVO"<<endl;
				}while(c<0);
				fprintf(a,"%10.2f  ",c);
			}
			caso++;
			break;
		case 'C':
			fclose(a);
			a=fopen("La cato.txt","r");
			do
			{
				c=getc(a);
				putchar(c);
			}while(c!=EOF);
			break;
		case 'D':
			fclose(a);
			break;
		default:
			cout<<"INGRESE LETRA CORRECTO"<<endl;
		}
	}while(op!='D');*/
	int cant,a,b,hip;
	cin>>cant;
	for(int i=0;i<cant;i++)
	{
		cin>>a>>b>>hip;
		if((a*a)+(b*b)==hip*hip)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}