Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

int main(){
	int N;
	double a,b,c,X;
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>a>>b>>c;
		if(a>b){
			X=a;
			a=b;
			b=X;
		}
		if(a>c){
			X=a;
			a=c;
			c=X;
		}
		if(b>c){
			X=b;
			b=c;
			c=X;
		}
		if(sqrt(a*a+b*b)==c){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
		//cout<<a<<b<<c;
	}
    return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;



int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;

string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;

int sum = 0;

vector<int> value;
vector<int> weight;

int dp[110][10010];

int data_[210][2] = {-2};

void input() {
	CI N;

	

	return;
}


int main(void) {
	input();
	
	int a = 0;
	int b = 0;
	int c = 0;
	int max = 0;
	int other1 = 0;
	int other2 = 0;

	for (int i = 0; i < N; i++) {
		CI a >> b >> c;
		if (a > max) {
			max = a;
			other1 = b;
			other2 = c;
		}
		if (b > max) {
				max = b;
				other1 = a;
				other2 = c;
		}
		
		if (c > max) {
			max = c;
			other1 = a;
			other2 = b;
		}
			
		

		if (other1 * other1 + other2 * other2 == max * max) {
			CO "YES" E
		}
		else {
			CO "NO" E
		}

		


	}


	return 0;
}

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

long int l[1000][3];

void swap(int a, int b, int c){
	int buf = l[c][a];
	l[c][a] = l[c][b];
	l[c][b] = buf;
}

//bubble
void sort(int c){
	for(int i = 0; i < 2; i++){
		for(int j = i; j < 2; j++){
			if(l[c][j] > l[c][j+1]) swap(j,j+1,c);	
		}
	}
}

int main(){
int buf;

cin >> buf;

for(int i = 0; i < buf; i++){	
	cin >> l[i][0] >> l[i][1] >> l[i][2];
	sort(i);
}

for(int j = 0; j < buf; j++){
	if(l[j][2]*l[j][2] == l[j][0]*l[j][0] +l[j][1]*l[j][1]){
		cout << "YES";
	}else{
		cout << "NO";
	}

	if(j != buf-1) cout << endl;
}

return 0;
}

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

int main()
{
	int n;
	int 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\n";
		else
			cout << "NO\n";
	}
	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<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;
        a *= a;
        b *= b;
        c *= c;
        if(a == b + c || b == a + c || c == a + b){
            cout << "YES\n";
        }else{
            cout << "NO\n";
        }
    }
    return 0;
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
         int num;
		 int n[3];
		 scanf("%d",&num);
		 for(int i=0;i<num;i++){
			 scanf("%d %d %d", &n[0],&n[1],&n[2]);
			 sort(&n[0] ,&n[2]);
			 if(n[0]*n[0]+n[1]*n[1] == n[2]*n[2]){
				 puts("YES");
			 }else{
				 puts("NO");
			 }
		 }
		 return 0;
}

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

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<stdio.h>

int triangle(int a, int b, int c)
{
	if((a+b>c) && (a+c>b) && (b+c>a))
	    return 1;
	else
		return 0;
}

int main()
{
	int a, b, c, i, n;
	scanf("%d", &n);
	int m[n];
	for(i = 0; i < n; i++)
	{
		scanf("%d %d %d", &a, &b, &c);
		*(m+i) = triangle(a, b, c);
	}	

	if(m[0]==0)
			printf("No");
		else
			printf("Yes");
	for(i = 1; i < n; i++)
	{
		if(m[i]==0)
			printf("\nNo");
		else
			printf("\nYes");
	}
	return 0; 
}

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

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

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

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
bool right(int a,int b,int c) {
 if(((a * a) + (b * b)) == (c * c)) {
  return true;
 } else {
  return false;
 }
}

int main() {
 int i = 0,j;
 int n;
 int side[3];
 bool cnt = false;
 vector<string> judge;
 
 cin >> n;
 
 while(i < n) {
  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((right(side[0],side[1],side[2]) == true) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }

  ++i;
 }
 
 for(i = 0;i < judge.size();++i) {
  cout << judge.at(i) << endl;
 }
 
 return 0;
}

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

int main()
{
 int n[3],t;
 scanf("%d", &t);
 while(t!=0){
  scanf("%d %d %d", &n[0],&n[1], &n[2]);
  sort(n,n+3);

  if((n[0]*n[0] + n[1]*n[1]) == n[2]*n[2]) printf("YES\n");
  else printf("NO\n");
  t--;
 }
return 0;

}