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>
using namespace std;
int main() {
	int a, b, c, N;
	cin >> N;
	for(int i=0; i<N; i++) {
		cin >> a >> b >> c;
		cout << (((a*a==b*b+c*c) || (b*b==c*c+a*a) || (c*c==a*a+b*b)) ? "YES" : "NO") << endl;
	}
}

C++: //AOJ0003 Is it a Right Triangle?
#include <stdio.h>

int main(){
	int i,num[3],line;
	scanf("%d",&line);
	for(i = 0; i < line; i++){
		if(scanf("%d %d %d",&num[0],&num[1],&num[2]) == EOF)break;
		if((num[0]*num[0] == num[1]*num[1]+num[2]*num[2])
			|| (num[1]*num[1] == num[0]*num[0]+num[2]*num[2])
			|| (num[2]*num[2] == num[0]*num[0]+num[1]*num[1]))
			printf("YES\n");
		else printf("NO\n");
		num[0]=0;num[1]=0;num[2]=0;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
long long a, b, c, d;
int main(){
	cin>>a;
	for(int i=0;i<a;i++){
		cin>>b>>c>>d;
		
		if(b>c&&b>d){
			if(((d*d)+(c*c))==(b*b))	
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
		else if(d>c&&d>b){
			if(((b*b)+(c*c))==(d*d))	
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
		else if(c>d&&c>b){
			if(((d*d)+(b*b))==(c*c))	
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
		else
			cout<<"NO"<<endl;
	}
}

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

using namespace std;

int main()
{
	int loopSize;
	cin >> loopSize;

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

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

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

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

C++: #include <iostream>

int triangle(int x, int y, int z)
{
	int a = x * x;
	int b = y * y;
	int c = z * z;
	return (a + b - c) * (b + c - a) * (c + a - b);
}

int main()
{
	int N, x, y, z;
	
	std::cin >> N;
	
	for(int i = 0; i < N; i++){
		std::cin >> x >> y >> z;
		if ( triangle(x, y, z) == 0 ){
			std::cout << "YES" << std::endl;
		} else {
			std::cout << "NO" << std::endl;
		}
	}
	
	return 0;
}

C++: #include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  int a[3];
  int i;
  int n;

  cin>>n;

  for(i=0;i<n;i++)
    {
      cin>>a[0]>>a[1]>>a[2];

      sort(a,a+3);

        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])
          cout<<"YES"<<endl;

        else
          cout<<"NO"<<endl;
    }

}

C++: #include<stdio.h>

void tri(int x, int y, int z)
{
    if((x == y + z) || (y == z + x) || (z == x + y)) {
        printf("YES\n");
    }else {
        printf("NO\n");
    }    
}

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

    scanf("%d", &num);

    for(int i = 0; i < num; i++) {
        scanf("%d %d %d", &a, &b, &c);
        tri(a*a, b*b, c*c);
    }

    return 0;
}

C++: #include<iostream>

bool right_triangle(int a,int b,int c)
{
    if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) {
        return true;
    }else{
        return false;
    }   
}

int main()
{
    int x,y,z,N;
    std::cin >> N;
    for (int i = 0; i < N; i++) {
        std::cin >> x >> y >> z;
        if (right_triangle(x,y,z)) {
            std::cout << "Yes" << std::endl;
        }else if (right_triangle(x,y,z) == 0 ) { 
            std::cout << "No" << std::endl;
        }
    }   
                                                            1,1          ??????

C++: #include<iostream>
int main(){int ts,x,y,z;std::cin>>ts;for(;ts--;std::cout<<(x+y-z&&y+z-x&&z+x-y?"NO\n":"YES\n"))std::cin>>x>>y>>z,x*=x,y*=y,z*=z;}

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

#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;

int N;

int main()
{
	scanf("%d",&N);
	FOR(i,0,N){
		int A [3];
		scanf("%d%d%d",&A [0],&A [1],&A [2]);
		sort(A,A + 3);
		if(A [0] + A [1] > A [2] && A [0] * A [0] + A [1] * A [1] == A [2] * A [2]){
			printf("Yes\n");
		}
		else{
			printf("No\n");
		}
	}

	return 0;
}

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

int main(){
    
	int i, a, b, c;
    int ab=0, bc=0, ca=0;
    
	cin >> i;
    
	while(i-- > 0){
        
		cin>> a>> b>> c;
        
        ab = a*a+b*b;
        bc = b*b+c*c;
        ca = c*c+a*a;
		
		if(ab == c*c || bc==a*a || ca==b*b) cout << "YES" << endl;
		else cout << "NO" << endl;
        
	}
    
    
	return 0;
}

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

int a,testcase;
int input[3];

int main()
{
	scanf("%d",&testcase);
	for(a=1;a<=testcase;a++)
	{
		scanf("%d %d %d",&input[0],&input[1],&input[2]);
		sort(input,input+3);
		if(input[0]*input[0]+input[1]*input[1]==input[2]*input[2])
		{
			printf("YES\n");
		}
		else
		printf("NO\n");
	}
	return 0;
}

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

int main()
{
	vector<int> v(3);
	int T;
	
	cin >> T;
	for(int t=0; t<T; t++)
	{
		cin >> v[0] >> v[1] >> v[2];
		std::sort(v.begin(), v.end());

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

C++: #include <stdio.h>
int main(){
	int a[3];
	int tmp = 0;
	int n = 0;
	scanf("%d",&n);
	
	for(int i = 0; i < n; i++){
		scanf("%d %d %d",&a[0],&a[1],&a[2]);
		
		if(a[0] > a[1]){
			tmp = a[0];
			a[0] = a[1];
			a[1] = tmp;
		}
		if(a[1] > a[2]){
			tmp = a[1];
			a[1] = a[2];
			a[2] = tmp;
		}
		if(a[0] > a[1]){
			tmp = a[0];
			a[0] = a[1];
			a[1] = tmp;
		}

		if(a[2] * a[2] == a[0] * a[0] + a[1] * a[1]){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}

	}
	return 0;
}