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<string>
#include<vector>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<sstream>
#include<functional>
#include<map>
#include<set>
#include<cmath>

#define REP(i,s,e) for(int i=int(s);i<int(e);i++)
#define rep(i,n) for(int i=0;i<int(n);i++)


using namespace std;

int main(){

int N;
cin >> N;

int a,b,c;
rep(i,N){

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

int IsRightTriangle(int a, int b, int c);

int main(void){
    int n, a, b, c;

    scanf("%d", &n);
    for (int i=0; i<n; i++){
        scanf("%d %d %d", &a, &b, &c);
        if (IsRightTriangle(a,b,c)){
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

int IsRightTriangle(int a, int b, int c){
    if (a*a == b*b + c*c) return 1;
    if (b*b == c*c + a*a) return 1;
    if (c*c == a*a + b*b) return 1;
    return 0;
}

C++: #include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <map>

using namespace std;
typedef long long Int;
#define REP(i , x) for(int i = 0 ; i < x ; ++i)


int main()
{
	int n;
	cin >> n;
	REP(i, n){
		int a[3];
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		string ans = a[2] * a[2] == a[1] * a[1] + a[0] * a[0] ? "YES" : "NO";

		cout << ans << endl;
	}
	return 0;
}

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

using namespace std;

int main()
{
	int num;

	cin >> num;

	for(int ix = 0;ix != num;++ix){
		int set[3];
		cin >> set[0] >> set[1] >> set[2];
		if((set[0]*set[0] + set[1]*set[1])==set[2]*set[2])
			cout <<"YES"<<endl;
		else
			cout <<"NO"<<endl;
	}

	return 0;
}

C++: n = int(input())
for i in range(n):
  h = list(map(int,input()))
  h.sort()
  if h[0]**2 ++ h[1]**2 == h[2]**2:
    print('YES')
  else:
    print('NO')

C++: // 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
#ifdef DAIJOBU
#include "/home/v-o_o-v/deb.h"
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#include <bits/stdc++.h>
#define deb(x...)
#endif 

using namespace std;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	int t;
	cin >> t;
	while(t--){
		int a, b, c;
		cin >> a >> b >> c;
		int can_1 = b * b + c * c - a * a;
		int can_2 = a * a + b * b - c * c;
		int can_3 = c * c + a * a - b * b;
		if(can_1 == 0 || can_2 == 0 || can_3 == 0)puts("YES");
		else puts("NO");
	}
	return 0;
}
// Write Here

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){

    int n;
    scanf("%d",&n);
    while(n--)
    {
        int a[3];
        for(int i=0;i<3;i++)
        {
            scanf("%d",&a[i]);
            a[i]*=a[i];
        }
        int maxSide=a[0];
        int sum=0;
        for(int i=1;i<3;i++)
        {
            if(a[i]>maxSide)
            {
                sum+=maxSide;
                maxSide=a[i];
            }
            else
                sum+=a[i];
        }
        if(sum==maxSide)
            printf("YES\n");
        else
            printf("NO\n");

    }

    return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main(){
	int t,s=-1,j;
	cin>>t;
	while(t--){
		int a[3],x=0;
		for(int i=0;i<3;i++){
			cin>>a[i];
			if(s<a[i]) j=i;
		//	x+=a[i];
		}
	    //x-=a[j];
	    //if(x<a[j]) cout<<"NO"<<endl;
	  //  else{
	    	x=0;
	    	for(int i=0;i<3;i++){
	    	 a[i]=pow(a[i],2);
	    	 if(i!=j) x+=a[i];
	        }
	        if(a[j]==x) 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;
	cout << ((a*a+b*b==c*c || b*b+c*c==a*a || a*a+c*c==b*b)? "YES": "NO") << endl;
  }
}

C++: #include <string>
#include <vector>
#include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int x,a[3];
    cin>>x;
    for(int i=1;i<x+1;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])cout<<"Yes"<<endl;
        else
            cout<<"No"<<endl;
    }
    return 0;
}

C++: #include<stdio.h>
int main(){
	int a;
	int b;
	int c;
	int x;
	int y=1;
	int z;
	scanf("%d",&x);
		while(y<=x){
		scanf("%d",&a);
		scanf("%d",&b);
		scanf("%d",&c);
		if(c>=b){
			z=c;
			c=b;
			b=z;
		}
		if(a<=c){
			z=a;
			a=b;
			b=c;
			c=z;
		}
		else if(b>=a){
			z=b;
			b=a;
			a=z;
		}
	z=a*a-b*b-c*c;
	if(z==0)
		puts("YES");
	else
		puts("NO");
	y++;
	}
return(0);
}

C++: #define scanf_s scanf
#include <stdio.h>
#include <iostream>
using namespace std;
#define MAX 200
int main(void)
{
	int n,a, b, c,x, sum, cou = 0;
	scanf_s("%d", &n);
	for (int i = 0; i < n; ++i) {
		scanf_s("%d %d %d", &a, &b, &c);
		if (a > b) {
			x = a; a = b; b = x;
		}
		if (b > c) {
			x = b; b = c; c = x;
		}
		if(c* c == a*a + b * b)	printf("YES\n");
		else printf("NO\n");
	}
}

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

int main(){
  int a[3], n, mx;
  cin >> n;
  while(n--){
    cin >> a[0] >> a[1] >> a[2];
    mx = max(max(a[0],a[1]),a[2]);
    if(a[0]==mx)
      a[0]=0;
    else if(a[1]==mx)
      a[1]=0;
    else
      a[2]=0;
    if(mx*mx == a[0]*a[0]+a[1]*a[1]+a[2]*a[2])
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}

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

int main()
{
	int a,b,c;
	int x=0;
	int n;
	cin >> n;
	for(int i=0 ;i<n ;i++){
		cin >> a >> b >> c;
		if(a<b && c<b){
			x=a;
			a=b;
			b=x;
		}
		else if(a<c && b<c){
			x=a;
			a=c;
			c=x;
		}

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

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

const char* judge_right_triangle(int, int, int);

int main(void)
{
    int a, b, c, n;
    cin >> n;
    for (int i = 0; i < n; i++ ) {
        cin >> a >> b >> c;
        cout << judge_right_triangle(a, b, c) << endl;
    }
    return 0;
}

const char* judge_right_triangle(int a, int b, int c)
{
    if ((a * a + b * b == c * c || b * b + c * c == a * a) || c * c + a * a == b * b) {
        return "YES";
    } else {
        return "NO";
    }
}

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

template <typename T>
bool isRight_Triangle ( T a, T b, T c )
{
	return (a * a + b * b == c * c) || (a * a + c * c == b * b) || (b * b + c * c == a * a);
}

int main() {
	int n;
	while (cin >> n) {
		for (int i = 0; i < n; ++i) {
			int a, b, c;
			cin >> a >> b >> c;

			if (isRight_Triangle(a, b, c)) {
				cout << "YES" << endl;
			}
			else {
				cout << "NO" << endl;
			}
		}
	}
	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int a,b,c;
	int i;
	int times;
	
	scanf("%d",&times);
	
	for(i=0;i<times;i++)
	{
		scanf("%d %d %d",&a,&b,&c);
		
		if(0.0 == (double)(a*a + b*b - c*c)/(2*a*b))
		{
			printf("YES\n");
		}
		else if(0.0 == (double)(b*b + c*c - a*a)/(2*b*c))
		{
			printf("YES\n");
		}
		else if(0.0 == (double)(c*c + a*a - b*b)/(2*c*a))
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	
	return 0;
}