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<stdio.h>
int main()
{
int n,a,b,c;
scanf("%d",&n);
while(n--){
scanf("%d %d %d",&a,&b,&c);
if(a==b||b==c||c==a){
printf("NO\n");
}
else{
    if(a>b&&a>c){
    if(b*b+c*c>=a*a)
    printf("YES\n");
    else
    printf("NO\n");
    }
    else if(b>a&&b>c){
    if(a*a+c*c>=b*b)
    printf("YES\n");
    else
    printf("NO\n");
    }
    else if(c>a&&c>b){
    if(a*a+b*b>=c*c)
    printf("YES\n");
    else
    printf("NO\n");
    }

}



}
return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;

int main(){
	int n, in[3];
	string res;
	cin >> n;
	for (int i = 0; i < n; ++i){
		res = "NO";
		for (int j = 0; j < 3; ++j)	cin >> in[j];
		for (int j = 0; j < 3; ++j){
			if (pow(in[j%3], 2) == pow(in[(j+1)%3], 2) + pow(in[(j+2)%3], 2)){
				res = "YES";
			}
		}
		cout << res << endl;
	}

	return 0;
}

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

int main()
{
	int a, b, c, d;
	int ans;
	
	cin >> d;
		for(int i = 0; i < d; i++)
		{
			cin >> a >> b >> c;
	
		if (a >= b && b >= c)
		{
			ans = a * a - b * b - c * c;
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}
	
		else if(b >= a && a >= c)
		{
			ans = b * b - a * a - c * c;
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}	
	
		else
		{
			ans = c * c - a * a - b * b;
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}
	}
	return 0;
}

C++: #include <cmath>
#include <iostream>

int main() {
    
    int N;

    std::cin >> N;
    
    while (N--) {
        int a, b, c;
        std::cin >> a >> b >> c;
        
        int a2 = a * a;
        int b2 = b * b;
        int c2 = c * c;
        
        if (a2 == b2 + c2 || b2 == c2 + a2 || c2 == a2 + b2) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    
    return 0;   
}

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

int main()
{
	int nNum=0;
	cin>>nNum;
	int nIn[3]={0};
	while(nNum--)
	{
		cin>>nIn[0]>>nIn[1]>>nIn[2];
		int nMax=max(max(nIn[0],nIn[1]),nIn[2]);
		if(nMax*nMax*2==nIn[0]*nIn[0]+nIn[1]*nIn[1]+nIn[2]*nIn[2])
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;


long long a,b,c,n;

int main(){
	cin>>n;
	long long maxs=0;
	for(int i=0;i<n;i++){
		cin>>a>>b>>c;
		int total=a+b+c;
		maxs=max(a,b);
		maxs=max(maxs,c);
		if(maxs>total-maxs) cout<<"NO"<<endl;
		else if(maxs==c){
			if(pow(c,2)==pow(a,2)+pow(b,2)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		else if(maxs==b){
			if(pow(b,2)==pow(a,2)+pow(c,2)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		else if(maxs==c){
			if(pow(a,2)==pow(c,2)+pow(b,2)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		
	}
}

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

using namespace std;

#define rep(i,n) for(int i = 0; i < n; i++)
#define REP(i,j,n) for(int i = j; i < n; i++)


int main(){

	int N = 0;
	cin >> N;
	vector<double> data(N);

	rep(i,N){
		rep(j,3){
			cin >> data[j];
		}

		sort(data.begin(),data.end());

		if(pow(data[2],2) == pow(data[0],2) + pow(data[1],2)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}

	}

	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, n1, n2, n3;
	int i = 1;
	cin >> n;
	do{
		cin >> n1 >> n2 >> n3;
		
		if(n1 * n1 + n2 * n2 == n3 * n3){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
		i++;
	}while(i <= n);
	
	return 0;
}

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

C++: #include <bits/stdc++.h>
using namespace std;

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

C++: #include<iostream>
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||b*b+c*c==a*a||c*c+a*a==b*b){
cout<<"YES"<<endl;} else{cout<<"NO"<<endl;}}}

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

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

C++: #include <iostream>
#include <cstdio>
using namespace std;
#define REP0(i,n) for(int i=0;i<n;++i)
#define REP1(i,n) for(int i=1;i<=n;++i)
#define ALL(c) (c).begin(),(c).end()
int main(){
	int n;
	scanf("%d",&n);
	REP0(i,n){
		int a,b,c;
		scanf("%d%d%d",&a,&b,&c);
		printf((a+b>c && b+c>a && c+a>b)?"YES\n":"NO\n");
	}
	return 0;
}

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

C++: #include <iostream>
#include <string>
#include <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;






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

	
}

C++: #include<iostream>
#include<cstring>
#include<algorithm>
#include<string>
#include<vector>
#include<map>
#include<cstdio>
#include<cmath>
#define pb push_back
#define mp make_pair
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
	int n;
	cin>>n;
	rep(i,n){
		vector<int>in(n);
		rep(j,3)cin>>in[j];
		sort(all(in));
		if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
}