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"
	} else {
		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 <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;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>

using namespace std;

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

	return 0;
}

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

int main() {

    int a, b, c;
    int n;

    cin >> n;

    while( 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++: #include<iostream>
#include<math.h>
using namespace std;
int main()
{
	int cant,a,b,hip;
	float cat;
	do
	{
		cin>>cant;
	}while(cant>1000);
	for(int i=0;i<cant;i++)
	{
		do
		{
			cin>>a>>b>>hip;
		}while(a<1||a>1000||b<1||b>1000||hip<1||hip>1000);
		cat=(a*a)+(b*b);
		if(sqrt(cat)==hip)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 1;
}

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;
input:
	cin >> N;
	if (N > 1000){
		goto input;
	}

	vector<bool> result;

	for (int i=0; i<N; ++i){
		int e1, e2, e3;
		vector<int> len;
input2:
		cin >> e1 >> e2 >> e3;
		if (!((1<=e1)&&(e1<=1000)) || !((1<=e2)&&(e2<=1000)) || !((1<=e3)&&(e3<=1000))){
			goto input2;
		}
		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]));
	}
	vector<bool>::iterator res = result.begin();

	while (res != result.end()){
		if (*res == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
		++res;
	}
	return 0;
}

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

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

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

int main(){
	int N;
	int l1, l2, l3;
	int answer=0;
	vector<int> lines;
	cin >> N;
	for(int i=0;i<N;i++){
		cin >> l1 >> l2 >> l3;
		lines.push_back(l1);
		lines.push_back(l2);
		lines.push_back(l3);
		while(next_permutation(lines.begin(), lines.end())){
			if(pow(lines[0],2) == pow(lines[1],2) + pow(lines[2],2)) answer = 1;
		}
		if (answer == 1) cout << "YES\n";
		else cout << "NO\n";
		lines.clear();
		answer = 0;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  while(scanf("%d %d %d",&a,&b,&c)!=EOF){
    if(a*a+b*b==c*c) printf("YES\n");
    else if(a*a+c*c==b*b) printf("YES\n");
    else if(b*b+c*c==a*a) printf("YES\n");
    else printf("NO\n");
  }
  return 0;
}

C++: #include "cstdio"
#include "cstring"
#include"algorithm"
using namespace std;
int main()
{
    //freopen("input.txt","r",stdin);
   	int t;
   	scanf("%d",&t);
   	while(t--)
   	{
   		int a[3];
   		scanf("%d%d%d",&a[0],&a[1],&a[2]);
   		sort(a,a+3);
   		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
   			printf("YES\n");
   		else
   			printf("NO\n");
   	}

    return 0;
};

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


}

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

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

  return EXIT_SUCCESS;
}