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>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <deque>
#include <algorithm>
#include <iomanip>
#include <functional>

#define REP(i, n) for(int i = 0;i < (n); i++)
#define REP2(i, x, n) for(int i = (x); i < (n); i++)
#define REPR(i, n) for(int i = (n); i >= 0; i--)

#define ALL(a) (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

#define LL long long int
#define LD long double

#define PI 3.14159265358979

using namespace std;

//================================================
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	int N;
	cin >> N;
	vector<string>ans(N);

	REP(i, N) {
		vector<int>vec(3);
		REP(j, 3) cin >> vec[j];
		SORT(vec);

		int a = vec[0] * vec[0];
		int b = vec[1] * vec[1];
		int c = vec[2] * vec[2];

		if (a + b == c) ans[i] = "YES";
		else ans[i] = "NO";
	}

	REP(i, N) cout << ans[i] << "\n";
	return 0;
}

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

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

	return 0;
}

C++: #include <cstdio>

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

	return 0;
}

C++: #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

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

C++: //	??´?§?????§???¢ 
#include<iostream>
using namespace std;

int main() {
	int a,b,c,n;
	cin >> n;
	for ( int i=0; i < n; i++ ){
		bool flag = false;
		cin >> a >> b >> c;
		if (a + b > c && a + c > b && b + c > a){
			if ( ((a*a + b*b) == c*c) ||  ((a*a + c*c) == b*b) || ((b*b + c*c) == a*a) ){
				flag = true;
			}
		}
		if (flag) {
			cout << "YES" << endl;
		}else {
			cout << "NO" << endl;
		}
	}
}

C++: #include "iostream"
using namespace std;

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

C++: #include<stdio.h>

int main()
{
    long int a,b,c,n,cas,i;
    scanf("%d",&cas);
    for(i=0;i<cas;i++){
    scanf("%ld%ld%ld",&a,&b,&c);

        if(a==b&&b==c)
            printf("NO\n");

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

}

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

int main() {
	int data_sets_num = 0;		//??\???????????????????????????????????°
	std::vector<string> result;
	
	for (int i = 0; i < data_sets_num; i++) {
		int first, second, third;

		cin >> first >> second >> third;
		if (
			(first * first == second * second + third * third) ||
			(second * second == first * first + third * third) ||
			(third * third == second * second + first * first)
			) {
			result.push_back("YES");
		}
		else {
			result.push_back("NO");
		}
	}

	for (unsigned int j = 0; j < result.size(); j++) {
		cout << result[j] << endl;
	}

	return 0;
}

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;
	cin >> N;

	vector<bool> result;

	for (int i=0; i<N; ++i){
		if (i == eN){
			break;
		}
		int e1, e2, e3;
		vector<int> len;
		cin >> e1 >> e2 >> e3;
		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]));
	}
	for (int i=0; i<N; ++i){
		if (result[i] == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

bool isRightTri(int a,int b,int c);
void swap(int& a,int &b);

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

bool isRightTri(int a,int b,int c){
  if(a>b) swap(a,b);
  if(b>c) swap(b,c);
  if(a*a+b*b-c*c==0) return true;
  return false;
}

void swap(int& a,int &b){
  int tmp;
  tmp=b;
  b=a;
  a=tmp;
}

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

C++: #include <iostream>

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

C++:  #include <cstdio>

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

	return 0;
}

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

int main()
{
	int l;
	cin >> l;
	for (int i = 0; i < l; i++) {
		int a, b, c;
		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>
using namespace std;
int main()
{
    long long int a,b,c,f,t;
    cin>>t;
    while(t--)
    {
        f=0;
        cin>>a>>b>>c;
        if(a>b && a>c)
        {
            if((b*b)+(c*c)==(a*a))
                f=1;
        }
        else if(b>a && b>c)
        {
            if((a*a)+(c*c)==(b*b))
                f=1;
        }
        else if(c>b && c>a)
        {
            if((b*b)+(a*a)==(c*c))
                f=1;
        }
        if(f==1)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
}