Go: package main

import (
	"fmt"
)

func main() {
	lines := [3]int{}
	var round int
	fmt.Scan(&round)
	for r := 0; r < round; r++ {
		fmt.Scan(&lines[0], &lines[1], &lines[2])

		if lines[0] > lines[1] && lines[0] > lines[2] {

		} else if lines[2] > lines[1] {
			tmp := lines[0]
			lines[0] = lines[2]
			lines[2] = tmp
		} else {
			tmp := lines[0]
			lines[0] = lines[1]
			lines[1] = tmp
		}

		if lines[1]*lines[1]+lines[2]*lines[2] == lines[0]*lines[0] {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	cin >> n;
	
	while(n > 0){
		int a, b, c;
		cin >> a >> b >> c;
		if(a * a + b * b == c * c || b * b + c * c == a * a ||
		  a * a + c * c == b * b)
			cout << "YES";
		else
			cout << "NO";
		cout << endl;
		
		-- n;
	}
	
	return 0;
}

C++: #include <stdio.h>

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

C++: #include <stdio.h>

int main(){
    int kase,i,a,b,c, x, y, z;
    scanf("%d",&kase);
    while(kase--){
        scanf("%d%d%d",&a ,&b ,&c);
        x = a*a;
        y = b*b;
        z = c*c;
        if(x==(y+z)){
            printf("YES\n");
        }
        else if(y==(x+z)){
            printf("YES\n");
        }
        else if(z==(x+y)){
            printf("YES\n");
        }
        else
            printf("NO\n");
    }

    return 0;
}

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

int main(){

	int a,b,c,n;
	cin >> n;

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

C++: #include <stdio.h>
int main(void){
    int a,b,c,x;
    scanf("%d",&a);
    while(~scanf("%d%d%d",&a,&b,&c)){
        int&t=(a>b?a:b);
        if(t>c)x=c,c=t,t=x;
        printf(a*a+b*b==c*c?"YES\n":"NO\n");
    }
    return 0;
}

C++: #include<iostream>


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

	
	return 0;
}

C++: #include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
int dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};
using namespace std;
typedef long long  ll;

int main()
{
	int N;
	
	cin>>N;
	rep(i, N) {
		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;
	}
}