Go: package main

import "fmt"

func main() {
	var n int

	fmt.Scanf("%d", &n)

	var a, b, c int
	for i := 0; i < n; i++ {
		var isTriangle bool
		fmt.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 {
			isTriangle = true
		}

		if isTriangle == true {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
int main() {
 int i,j;
 int n;
 int side[3];
 bool cnt = false;
 vector<string> judge;
 
 cin >> n;
 
 for(i = 0;i < n;++i) {
  cin >> side[0] >> side[1] >> side[2];
 
  for(j = 0;j < 3;++j) {
   if((side[j] < MIN) || (side[j] > MAX)) {
    cnt = true;
   }
  }
 
  if(cnt == true) continue; 
 
  sort(side, side + 3);
 
  if(((side[0] % 3) == 0) && ((side[1] % 4) == 0) && ((side[2] % 5) == 0)) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }
 }
 
 for(i = 0;i < judge.size();++i) {
  cout << judge.at(i) << endl;
 }
 
 return 0;
}

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

int main(void){
    int n=0;
    int a,b,c = 0;
    std::cin>>n;
    if(0!=n){
        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;
}