Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

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)

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;
}

C++: #include<iostream>
using namespace std;
int main(){
    int a,b,c,d,s,t,n,i;
    cin >> n;
    for(i=0;i<n;i++){
    cin >> a >> b >> c;
    if(a<b){
        d=b;
        b=a;
        a=d;
    }if(b<c){
        d=c;
        c=b;
        b=d;
    }if(a<b){
        d=b;
        b=a;
        a=d;
    }
    s=a*a;
    t=(b*b)+(c*c);
    if(s==t){
        cout << "Yes"<< endl;
        }else {
        cout << "No" << 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;
}

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

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

    return 0;
}

C++: #include <iostream>

int main() {
	using namespace std;

	int sampleNum;
	cin >> sampleNum;

	for (; sampleNum > 0; --sampleNum) {
		int a, b, c;
		cin >> a >> b >> c;
		bool right = false;
		right = a * a == b * b + c * c || b * b == c * c + a * a || c * c == a * a + b * b;
		cout << (right ? "YES" : "NO") << endl;
	}

	return 0;
}

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

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

int main (void)
{
	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 	cout << "NO" << endl;
	}
	return 0;
}

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

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int n;
	cin >> n;
	for(int i=0;i<n;i++){
		int v1,v2,v3;
		vector<int> v;
		cin >>v1>>v2>>v3;
		v.push_back(v1);
		v.push_back(v2);
		v.push_back(v3);
		sort(v.begin(),v.end(),greater<int>());
		cout <<(v[0]*v[0] == v[1]*v[1]+v[2]*v[2]?"YES":"NO")<< endl;
	}
	return 0;
}

C++: #include <iostream>
#include <math.h>

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	int max_num = max(a, max(b, c));
	int sub1, sub2;
	if (max_num != a) {
		sub1 = a;
		if (max_num != b) sub2 = b;
		else sub2 = c;
	} else if (max_num != b) {
		sub1 = b;
		sub2 = c;
	} 		
	if (pow(max_num, 2) == pow(sub1, 2) + pow(sub2, 2)) f = true;
	if (f) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main() {
	int num, a, b, c;
	cin >> num;
	for (int i=0; i<num; i++) {
		cin >> a >> b >> c;
		solve(a,b,c);
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>

using namespace std;

int main(void){
  int deta;
  //データ数をもらう
  scanf("%d", &deta);

  //データ数だけ３辺の値をもらう
  for(int i = 0; i < deta; i++){
    int hen1, hen2, hen3;
    scanf("%d", &hen1);
    scanf("%d", &hen2);
    scanf("%d", &hen3);

    //直角三角形の判定
    if(hen1*hen1 + hen2*hen2 == hen3*hen3 ||
       hen2*hen2 + hen3*hen3 == hen1*hen1 ||
       hen3*hen3 + hen1*hen1 == hen2*hen2){
      printf("YES\n");
    }else{
      printf("NO\n");
    }

    
  }


  return 0;
}

C++: #include <iostream>
//#include <cstdio>
//#include <cmath>
using namespace std;
 
//0003
int main(){
	int n;
	int a, b, c, a2, b2, c2;
	cin >> n;
	while(n--){
		cin >> a >> b >> c;
		a2 = a*a;
		b2 = b*b;
		c2 = c*c;

		if(a==b && b==c){
			cout << "NO" << endl;
			continue;
		}
		if(a2==b2+c2 || b2==a2+c2 || c2==a2+b2){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}