Go: package main

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

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)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

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
}

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

auto main () -> int
{
    const char * res [] = {"NO" , "YES"};
    int n;
    std::cin >> n;

    for (auto i = 0; i < n; ++ i)
    {
        int a , b , c;
        std::cin >> a >> b >> c;
        std::cout << res [a * a + b * b == c * c] << std::endl;
    }
}

C++: #include <iostream>

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

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

int main(){

int i,j,d,n1,n2,n3,k,temp;


   cin >> d;
   while(d <= 0 or d >= 1000){
       cin >> d;
   }
 

 
 int l[d][3];
 

//入力
for(i=0; i<d; i++){
   cin >> n1 >> n2 >> n3;
   
   if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[i][0]=n1;
       l[i][1]=n2;
       l[i][2]=n3;
        for (k = 0; k < 2; k++) {
        for (j = 2; j > k; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[i][j];  
                l[i][j] = l[i][j - 1];
                l[i][j - 1] = temp;
            }
        }
    }
   }else{
   i--;
   }
}

    
//出力
for (i = 0; i < d; i++) {
    if(l[i][2]*l[i][2] == (l[i][1]*l[i][1]+l[i][0]*l[i][0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}

    return 0;
}

C++: #include<iostream>
#include<cmath>
#include<algorithm>
#include<string>
#include<cctype>
#include<vector>
#include<queue>
#include<map>
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 || b*b == a*a + c*c || c*c == b*b + a*a)cout << "YES" << endl;
		else cout << "NO" << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int n,a[3];
	cin>>n;
	for(int i=0;i<n;i++){
		for(int j=0;j<3;j++){
			cin>>a[j];
		}
		sort(a,a+3);
		if(a[2]*a[2]==(a[0]*a[0]+a[1]*a[1]))cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
    int i,j,line,k,l,input1,input2,input3;
    scanf("%d",&line);
    for(l=1;l<=line;l++)
    {
        scanf("%d %d %d",&input1,&input2,&input3);
        if((input1*input1+input2*input2)==(input3*input3) || (input3*input3+input2*input2)==(input1*input1) || (input1*input1+input3*input3)==(input2*input2))
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
    return 0;
}

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

C++: #include<iostream>
#include<cstdio>
#include<stdio.h>
#include<string>
using namespace std;
int main() {
	long judge[1000],i,n,a[1000],b[1000],c[1000];

	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i]*a[i] + b[i]*b[i] == c[i]*c[i]) {
			judge[i] = true;
		}
		else {
			judge[i] = false;
		}

	}
	for (i = 0; i < n; i++) {
		if (judge[i]==true) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	
	

	return 0;
}

C++: //Is it a Right Triangle?
#include<bits/stdc++.h>
using namespace std;

//slope:3??°????????§???
bool judge(int slope, int x1, int x2){
  if(pow((double)slope, 2.0)==(pow((double)x1, 2.0)+pow((double)x2, 2.0))) return true;
  else return false;
}

int main(){
  int n, a, b, c;
  scanf("%d", &n);
  for(int i=0; i<n; i++){
    scanf("%d %d %d", &a, &b, &c);
    vector<int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    sort(v.begin(), v.end(), greater<int>());
    if(judge(v[0], v[1], v[2]))printf("YES\n");
    else printf("NO\n");
  }

  return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int N,s1,s2,s3;
	cin>>N;
	while(N--){
		cin>>s1>>s2>>s3;
		s1 = s1 * s1;
		s2 = s2 * s2;
		s3 = s3 * s3;
		if(s1 == s2 + s3 || s2 == s1 + s3 || s3 == s2 + s1){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
	int a[100],b[100],c[100];
	int x=0;
	int n;

	while(true){
		cin >> n;

		if(n==0)
			break;
		for(int i=0 ;i<n ;i++){

     		cin >> a[i] >> b[i] >> c[i];

	    	if(a[i]<b[i]){
		    	x=a[i];
			    a[i]=b[i];
		    	b[i]=x;
		    }
		    if(b[i]<c[i]){
		    	x=b[i];
	     		b[i]=c[i];
		    	c[i]=x;
		    }
		    if(a[i]<b[i]){
		    	x=a[i];
			    a[i]=b[i];
			    b[i]=x;
	    	}
		}
		for(int i=0 ;i<n ;i++){
		    a[i] = a[i]*a[i];
		    b[i] = b[i]*b[i];
		    c[i] = c[i]*c[i];

     		if(a[i]==b[i]+c[i])
	    		cout << "YES" << endl;
		    else
			    cout << "NO" << endl;
		}  
	        
	}
	
	return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
int main(void){
  int num,i=0;
  int* a;
  int* b;
  int* c;
 
  scanf("%d",&num);

  a=(int*)calloc(num,sizeof(int));
  b=(int*)calloc(num,sizeof(int));
  c=(int*)calloc(num,sizeof(int));


  while(num>i){
    scanf("%d %d %d",(a+i),(b+i),(c+i));
    i++;
    
  }

  for(i=0;num>i;i++){
   *a=*a**a;
   *b=*b**b;
   *c=*c**c;
   if(*a==*c+*b || *b==*a+*c || *c==*b+*a){
      printf("YES\n");
    }
    else{
      printf("NO\n");
    }
    a++;
    b++;
    c++;
  }
  return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++)  //a~(b - 1)?????§
#define print(i) cout << i << endl //?°??????????Python?????????

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
/*-------------------------------*/

int main(void)
{
  int a;
  int da[3];
  cin >> a;

  FOR(i, 0, a){
    cin >> da[0] >> da[1] >> da[2];
    sort(da, da + 3);
    if (da[0] * da[0] + da[1] * da[1] == da[2] * da[2]) print("YES");
    else print("NO");
  }

  return 0;
}

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

int main(){
    int a,b,c,i;
	for(int j=0;j<1000;j++){
		//if(!(cin >> a >> b >> c))break;
		a = a*a;
		b = b*b;
		c = c*c;
		if(a==b+c || b==a+c || c==a+b)cout << "YES" << endl;
		else cout << "NO" << endl;
	}

    
    return 0;
}

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

int main(void){

	int n;
	cin>>n;

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

	return 0;
}

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>
#include <algorithm>
using namespace std;

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