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++: // 0003.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include<stdio.h>
#include "stdafx.h"
#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[2]==a[1]*a[1]+a[0]*a[0]) { cout << "YES"<<endl; }
		else { cout << "NO"<<endl; }
		
		}
	return 0;

}

C++: #include<iostream>

int main(){
	int a,b,c;
	
	std::cin>>a>>b>>c;
	if(a*a==b*b+c*c){
		std::cout<<"YES"<<std::endl;
		}if(b*b==a*a+c*c){
		std::cout<<"YES"<<std::endl;
		}if(c*c==b*b+a*a){
		std::cout<<"YES"<<std::endl;
			}else{
			std::cout<<"NO"<<std::endl;
			}

	

    return 0;
}

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

int main(){
    int n;
    scanf("%d", &n);
    int sides[3];
    for (int i = 0; i < n; i++){
	cin >> sides[0] >> sides[1] >> sides[2];
	sort(sides, sides+3);
	printf("%s\n", (sides[0]^2 + sides[1]^2 == sides[2]^2)? "YES" : "NO");
    }
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a[3];
  int judge[1001];
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>a[0];
    cin>>a[1];
    cin>>a[2];
    for(int j=0;j<2;j++){
      for(int k=0;k<1;k++){
	if(a[k]<a[k+1]){
	  int temp=a[k];
	  a[k]=a[k+1];
	  a[k+1]=temp;
	}
      }
    }
    if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
      judge[i]=1;
    }else{
      judge[i]=0;
    }
  }
  for(int i=0;i<n;i++){
    if(judge[i]==1){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}

C++: #include<iostream>
int main(){
	int a,b,c,n,i;
std::cin>>n;
for(i=0;i=n;i++){
	std::cin>>a>>b>>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 <iostream>
using namespace std;

class Triangle{
private:
	int a, b, c;
public:
	void Set();
	bool Jugde();
};

void Triangle::Set(){
	cin >> a >> b >> c;
}

bool Triangle::Jugde(){
	int buf;
	if(a < b){
		buf = a;
		a = b;
		b = buf;
	}
	if(a < c){
		buf = a;
		a = c;
		c = buf;
	}
	if(a*a == b*b + c*c) return true;
	else return false;
}

int main(){

	int n;
	bool jugde;
	Triangle* dataset;

	cin >> n;

	dataset = new Triangle[n];

	for(int i = 0; i < n; i++)
		dataset[i].Set();

	for(int i = 0; i < n; i++){
		jugde = dataset[i].Jugde();
		if(jugde == true)
			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){
			x=a;
			a=b;
			b=x;
		}
		else if(a<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>
#include <cmath>
using namespace std;

int main() {
    int N;
    cin >> N;
    int a, b, c;
    while (N--) {
        cin >> a >> b >> c;
        int l=max(a,max(b,c));
        int x, y;
        if (a==l) {
            x=b;
            y=c;
        } else if (b==l) {
            x=a;
            y=c;
        } else if (c==l) {
            x=a;
            y=b;
        }
        if (l==sqrt(pow(x,2)+pow(y,2))) {
            printf("Yes\n");
        } else {
            printf("No\n");
        }
    }
    return 0;
}

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

C++: #include<iostream>

#define REP(i, a) for(int i=0;i<(int)a;++i)
using namespace std;

void solver() {
    int N;
    cin >> N;
    REP(i, N) {
        int a, b, c;
        cin >> a >> b >> c;
        bool isTri = a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b;
        cout<<(isTri?"YES":"NO")<<endl;
    }
}

int main() {
    solver();
    return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
 
int main() {
	int len[3];
	int N;
	cin >> N;
	for (int j = 0; j < N; j++) {
		cin >> len[0] >> len[1] >> len[2];
		for (int i = 0; i < 3; i++) {
			len[i] = len[i] * len[i];
		}
		if (len[0] + len[1] == len[2] ||
			len[1] + len[2] == len[0] ||
			len[2] + len[0] == len[1])
		{
			cout << "YES\n";
		}
		else {
			cout << "NO\n";
		}
	}

    return 0;
}

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

int main()
{
double a,b,c,x,y,z;
while(cin>>a>>b>>c)
{
x=a*a;
y=b*b;
z=c*c;
if(a+b==c||b+c==a||c+a==b)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
return 0;
}

C++: #include <deque>
#include <iostream>
#include <algorithm>
 
int main()
{
using namespace std;
deque<int> edge;
int iedge[3];
int j;
int a,b,c;
 
cin >> j;
 
for(int l=0;l<j;l++){
for(int i=0;i<3;i++){
cin >> iedge[i];
edge.push_back(iedge[i]);
}
 
sort(edge.begin(),edge.end());
a = edge[0];
b = edge[1];
c = edge[2];
if(c*c == (a*a+b*b))cout << "YES\n";
else cout << "NO\n";

edge.clear();
}
 
return 0;
}

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

int main(){
  int a,b,c;
  while(scanf("%d %d %d",&a,&b,&c)!=EOF){
  a*=a;
  b*=b;
  c*=c;
  if(a==(b+c)||b==(a+c)||c==(a+b))cout << "YES" <<endl;
  else cout << "NO" <<endl;
  }
  return 0;

C++: #include <stdio.h>

int triJudgefunc(int x, int y, int z);

int main(void)
{
    int row;
    scanf("%d", &row);
    for (int i = 0; i < row; ++i) {
        int firstn, secondn ,thirdn; 
        scanf("%d %d %d", &firstn, &secondn, &thirdn);
        if (judgefunc(firstn, secondn, thirdn) = true) {
        printf("YES\n");
        } else {
        printf("NO\n");
        }
    }
    return 0;
}



int triJudgefunc(int x, int y, int z)
{
    double maxlength, notmax1, notmax2;
    if (x > y) {    //x > y
        if (x > z) {
            maxlength = x, notmax1 = y, notmax2 = z;    //x???max
        } else {
            notmax1 = x, notmax2 = y, maxlength = z;    //z???max
        }
    } else {    //y > x
        if (y > z) {
            notmax1 = x, maxlength = y, notmax2 = z;    //y???max
        } else {
            notmax1 = x, notmax2 = y, maxlength = z;    //z???max
        }
    }
    double result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2;
    return result;
}