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

int main() {
    string str;
    int n;
    cin >> n;
    vector<int> vx, vy, vz;
    for(int i = 0; i < n; i++) {
        int x, y, z;
        cin >> x >> y >> z;
        vx.push_back(x);
        vy.push_back(y);
        vz.push_back(z);
    }
    
    for(int i = 0; i < n; i++) {
        vector<int> v;
        v.push_back(vx[i]);
        v.push_back(vy[i]);
        v.push_back(vz[i]);

        sort(v.begin(), v.end());
        if(pow(v[2],2.0) == pow(v[0],2.0) + pow(v[1],2.0)){
            str = "Yes";
        } else {
            str = "No";
        }
        cout << str << endl;
    }  
}

C++: #include <cstdio>

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

C++: #include <cstdio>

#define MAX(a, b)((a) < (b) ? (b) : (a))

using namespace std;

int pow32(int base, int exp)
{
    int ret = 1;
    
    while (exp) {
        if ((exp & 1) == 1) ret *= base;
        
        exp >>= 1;
        base *= base;
    }
    
    return ret;
}

void YES()
{
    printf("YES\n");
}

void NO()
{
    printf("NO\n");
}
 
int main() {
	int N;
	int a, b, c;
	int longest;

	scanf("%d", &N);
	
	while (N--) {
	    scanf("%d %d %d", &a, &b, &c);
	    
	    longest = MAX(a, MAX(b, c));
	    
	    if (longest == a) {
	        if (pow32(a, 2) == (pow32(b, 2) + pow32(c, 2))) YES();
	        else NO();
	    } else if (longest == b) {
	        if (pow32(b, 2) == (pow32(a, 2) + pow32(c, 2))) YES();
	        else NO();
	    } else if (longest == c) {
	        if (pow32(c, 2) == (pow32(a, 2) + pow32(b, 2))) YES();
	        else NO();
	    }
	}
	
	return 0;
}

C++: #include <stdio.h>

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

    scanf("%d%d%d",&a,&b,&c);

    a*=a;
    b*=b;
    c*=c;

    if(a == b+c || b== a+c || c==a+b){
        printf("YES\n");
    }else{
        printf("NO\n");
    }

    return 0;
}

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

bool check(const int* array);
int main(void) {
    int length[3];
    
    while(cin >> length[0] >> length[1] >> length[2]) {
        sort(length, length + 3);
        if(check(length)) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

bool check(const int* array) {
    if(array[0] * array[0] + array[1] * array[1] == array[2] * array[2]) {
        return true;
    } else {
        return false;
    }
}

C++: #include<stdio.h>
int main(void)
{
	int n,a,b,c,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
		if(a>b&&a>c){
			if(c*c+b*b==a*a){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
		if(a<b&&b>c){
			if(a*a+c*c==b*b){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
		if(c>b&&a<c){
			if(a*a+b*b==c*c){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}
		if(a==b&&a==c){
			printf("NO\n");
		}
	}
	return 0;
}

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

int main(){
  int n,tri[3];

  cin >> n;

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

  return 0;
}

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

C++: #include <iostream>
int main(void){
	int n,a,b,c,d;
	std::cin>>n;
	while(n--){
		std::cin>>a>>b>>c;
		if (a>b){d=a;a=b;b=d;};
		if (b>c){d=b;b=c;c=d;};
		std::cout<<(a*a+b*b==c*c?"YES\n":"NO\n");
	}
}

C++: #include<stdio.h>
#include<math.h>
int main(void)
{
	int n,i,w[1000],a[10000],s[10000],d[10000],x[10000];
	while(scanf("%d",&n)!=EOF){
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a[i],&s[i],&d[i]);
			w[i]=(a[i]*a[i])+(s[i]*s[i]);
			x[i]=d[i]*d[i];
		}
		for(i=0;i<n;i++){
			if(w[i]==x[i]){
				printf("YES\n");
			}
			else{
				printf("NO\n");
			}
		}	
	}
	return 0;
}

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

#define int long long int
#define main signed main()
#define bye return 0
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define each(p, v) for (auto p = (v).begin(); p != (v).end(); p++)
#define all(v) (v).begin(), (v).end()
#define prec(n) fixed << setprecision(n)
#define dump(x) cerr << "(L" << __LINE__ << ") " << #x << " = " << (x) << endl
#define clr(x, a) memset(x, a, sizeof(x))

#define sum(v) accumulate(all(v), 0)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define odd(n) ((n) % 2)
#define even(n) (!odd(n))

#define INF 1000000000
#define MOD 1000000007

#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define vi vector<int>
#define vb vector<bool>
#define vc vector<char>

using namespace std;

main {
  int n;
  cin>>n;
  rep(i,n) {
    int a,b,c;
    cin>>a>>b>>c;
    a*=a; b*=b; c*=c;
    cout<<(a+b==c||b+c==a||c+a==b?"YES":"NO")<<endl;
  }
  bye;
}

C++: i;main(a,b,c){for(scanf("%*d"),i=10;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;exit(0);}

C++: 
#include <string>
#include <sstream>
#include <iostream>

int main(void) 
{
    std::string str;
    int lens[3];
    int nolines;

    getline(std::cin, str);
    std::istringstream str_s(str);

    str_s >> nolines;

    int i;
    for (i = 0; i < nolines; i++) {
        getline(std::cin, str);
        std::istringstream str_s(str);

        str_s >> lens[0] >> lens[1] >> lens[2];

        std::sort(lens, lens+3);

        if (lens[2] * lens[2] == lens[0] * lens[0] + lens[1] * lens[1]) 
            std::cout << "YES" << std::endl;
        else
            std::cout << "NO"  << std::endl;
    }

    return 0;
}

C++: main(a,b,c){
for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);
puts((a+b-c&&a+c-b&&b+c-a)?"NO":"YES"))
a*=a,b*=b,c*=c;
exit(0);
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<string>


using namespace std;

string check(int a,int b,int c){
	if(a*a+b*b==c*c)return "YES";
	else return "NO";
}


int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		vector<int> n;
		int a,b,c;
		cin>>a>>b>>c;
		n.push_back(a);
		n.push_back(b);
		n.push_back(c);
		sort(n.begin(),n.end());
		string ans=check(a,b,c);
		cout<<ans<<endl;
	}
	return 0;
}