Go: package main

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

func main() {
	n, err := strconv.Atoi(strScan())
	if err != nil {
		fmt.Println("数字を入力して下さい。")
	} else {
		var counter int = n
		var judgeArr []string
		scanner := bufio.NewScanner(os.Stdin)
		for scanner.Scan() {
			strArr := strings.Fields(scanner.Text())
			castNumArr := StringToInt(strArr)
			judgeArr = append(judgeArr, checkTriangle(castNumArr))
			counter--
			if counter == 0 {
				break
			}
		}
		for _, v := range judgeArr {
			fmt.Println(v)
		}
	}
}

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"
	} else {
		return "NO"
	}
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

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;

}

C++: #pragma GCC optimize "O3"
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <cassert>
#define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x)
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define REP_FROM(i,m,n) for (int i = (m); (i) < int(n); ++(i))
#define REP_REV(i,n) for (int i = (n)-1; (i) >= 0; --(i))
#define REP_FROMREV(i,m,n) for (int i = (n)-1; (i) >= int(m); --(i))
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#ifndef LOCAL
#define cerr if (false) cerr
#endif
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

template <class T> inline void setmax(T & a, T const & b) { a = max(a, b); }
template <class T> inline void setmin(T & a, T const & b) { a = min(a, b); }
template <class T> T sq(T x) { return x * x; }
template <class T> T clamp(T a, T l, T r) { return min(max(a, l), r); } // [l, r]
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int isRightTriangle(int a, int b, int c) {
	if(a > b && a > c)
		return b*b+c*c == a*a;
	else if(b > a && b > c)
		return a*a+c*c == b*b;
	else
		return a*a+b*b == c*c;
}

int main(int argc, char *argv[]) {
	// Something to do
	int n;
	cin >> n;
	REP(i, n) {
		int a, b, c;
		cin >> a >> b >> c;
		if(isRightTriangle(a,b,c))
			cout << "YES" << endl;
		else
			cout << "NO"  << endl;
	}
	return 0;
}