Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i:=0; i<n; i++{
	    data := nextInts(3)
	    sort.Ints(data)
	    if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
	        fmt.Fprintln(out, "YES")
	    }else{
	        fmt.Fprintln(out, "NO")
	    }
	}
}

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

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

C++: #include <iostream>

using namespace std;

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

    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<stdio.h>
int main(){
int n,a[1000],b[1000],c[1000],i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d %d",&a[i],&b[i],&c[i]);
}
for(i=0;i<n;i++){
if(a[i]*a[i]+b[i]*b[i]==c[i]*c[i]||c[i]*c[i]+b[i]*b[i]==a[i]*a[i]||a[i]*a[i]+c[i]+c[i]==b[i]*b[i]){
printf("Yes\n");
}
else{
printf("No\n");
}
}
return 0;
}

C++: #include<iostream>


int main(){
  int a,b,c;
  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 <bits/stdc++>
using namespace std;

int N;
int a[3]; 

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
      printf("%s\n" , YES);
    } else {
      printf("%s\n" , NO);
    }
  }
  
}

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

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

int main()
{
	int N;
	cin >> N;
	int A[3];
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < 3; j++) {
			cin >> A[j];
		}
		sort(A, A + 3);
		if ((A[0] * A[0] + A[1] * A[1]) == (A[2] * A[2])) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main(){
    int i,j;
    int n;
    cin >> n;
    for(i=0;i<n;i++){
        int ar[3];
        for(j=0;j<3;j++) cin >> ar[j];
        int sum = 0;
        for(j=0;j<3;j++) sum += ar[j] * ar[j];
        for(j=0;j<3;j++) if(sum==ar[j]*ar[j]*2) break;
        if(j==3) cout << "NO" << endl;
        else cout << "YES" << endl;
    }
    return 0;
}

C++: #include<bits/stdc++.h>
#define ll long long 
#define ull unsigned long long 
#define ld long double
#define ui unsigned int 
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		int arr[3];
		for (int i = 0; i < 3; i++) {
			cin >> arr[i];
		}
		sort(arr, arr + 3);
		arr[0] *= arr[0];
		arr[1] *= arr[1];
		int s = arr[0] + arr[1];
		if (s != (arr[2] * arr[2])) {
			cout << "NO" << endl;
		}
		else
			cout << "YES" << endl;
	}
}

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

using namespace std;


int main(){
	int n;
	cin>>n;
	int hen1,hen2,hen3,saidai,max_pos;

	for(int i=0;i<n;i++){
		cin>>hen1>>hen2>>hen3;
max_pos=1;
		saidai=hen1;
		if(saidai<hen2){
			saidai=hen2;
			max_pos=2;
		}
		if(saidai<hen3){
			saidai=hen3;
			max_pos=3;
		}
		switch(max_pos){
		case 1:
			hen1=0;
			break;
		case 2:
			hen2=0;
			break;
		case 3:
			hen3=0;
			break;
		}
		if(saidai*saidai==(hen1*hen1+hen2*hen2+hen3*hen3))
			cout<<"YES"<<"\n";
		else{
			cout<<"NO"<<"\n";
		}
	}
	
	
	return 0;
}

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

int main(){
	int N;
	cin >>N;
	for(int i =0;i<=N;i++){
		int j,k,l;
		cin >> j;
		cin >> k;
		cin >> l;
		if(j*j+k*k==l*l||k*k+l*l==j*j||l*l+j*j==k*k)
			cout << "YES"<<endl;
		else
			cout <<"NO"<<endl;
		
	}

	return 0;
}

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

#define N 1000

struct{int a[3];} d[N];

int main(){
    int i,j,L;
    int longest,small;
    scanf("%d",&j);
    for(i=0; i<j && i<N; i++)
        scanf("%d %d %d",&d[i].a[0],&d[i].a[1],&d[i].a[2]);
    L=i;
    for(i=0;i<L;i++){        
        longest=0; small=0;
        for(j=0;j<3;j++)
            if(longest<d[i].a[j])
                longest=d[i].a[j];
        for(j=0;j<3;j++)
            if(d[i].a[j]!=longest)
                small+=pow(d[i].a[j],2);
        if(small==pow(longest,2))
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}

C++: #include<iostream>
using std::cin;
using std::cout;
using std::endl ;
int main()
{
	int N,i,j,t;
	int a[1000][3];
	cin>>N;
	for(i=0;i!=N;i++)
	{
		for(j=0;j!=3;j++)
			cin>>a[i][j];
	}
	for(i=0;i!=N;i++)
	{
		for(j=0;j!=2;j++)
			if(a[i][j]>a[i][j+1])
			{	t=a[i][j];a[i][j]=a[i][j+1];a[i][j+1]=t;}
		if(a[i][2]*a[i][2]==a[i][1]*a[i][1]+a[i][0]*a[i][0])
			cout<<"yes"<<endl;
		else
			cout<<"no"<<endl;
	}
	return 0;
}

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

C++: #include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>

using namespace std;

void inputData(vector<string>& data_set, int header = 0) {
	string buffer;

	for(int i = 0; i < header; ++i)
		getline(cin, buffer);

	while(getline(cin, buffer))
		data_set.push_back(buffer);
}

vector<string> splitString(const string& str, const string& separator = " ") {
	vector<string> ret;

	std::size_t bp, ep;
	bp = ep = 0;
	while((ep = str.find_first_of(separator, bp)) != string::npos){
		if(bp != ep){
			ret.push_back(string(str.begin() + bp, str.begin() + ep));
		}
		bp = ep + 1;
	}

	if(bp <= str.size() - 1){
		ret.push_back(string(str.begin() + bp, str.end()));
	}

	return ret;
}

template <class T>
T convertStringToNumber(const string& str) {
	stringstream ss;
	T ret;

	ss << str;
	ss >> ret;

	return ret;
}

bool isRightTriangle(const vector<int>& edge_set) {
	int max_index = 0;

	if(edge_set[max_index] < edge_set[(max_index+1)%3])
		max_index = (max_index+1)%3; 
	if(edge_set[max_index] < edge_set[(max_index+2)%3])
		max_index = (max_index+2)%3; 

	return ((edge_set[max_index] * edge_set[max_index]) ==
				(edge_set[(max_index+1)%3] * edge_set[(max_index+1)%3]
				+ edge_set[(max_index+2)%3] * edge_set[(max_index+2)%3]));
}


vector<bool> evaluateTriangle(const vector<string>& data_str) {
	vector<bool> ret(data_str.size());

	for(int i = 0; i < data_str.size(); ++i) {
		auto temp = splitString(data_str[i]);
		vector<int> buff { convertStringToNumber<int>(temp[0]),
							convertStringToNumber<int>(temp[1]),
							convertStringToNumber<int>(temp[2])};

		ret[i] = isRightTriangle(buff);
	}

	return ret;
}


void doAllProcess() {
	vector<string> buffer;

	inputData(buffer, 1);

	vector<bool> ret = evaluateTriangle(buffer);

	for(int i = 0; i < ret.size(); ++i)
		std::cout << (ret[i] ? "YES" : "NO") << std::endl;
}



int main() {
	doAllProcess();

	return 0;
}