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 <math.h>
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 || a*a + c*c == b*b || c*c + b*b == a*a)
			cout << "YES\n";
		else
			cout << "NO\n";
	}
	return 0;
}

C++: def main():
    n = int(input())
    for i in range(n):
        a, b, c=(int(x) for x in input().split())
        if a+b<=c or a+c<=b or b+c<=a:
            print("NO")
        else:
            print("YES")

main()

C++: #include<iostream>

using namespace std;

//??\?????????
void swap(int *a, int *b){
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main(){

	int num,i,j;
	
	cout << "the number of data set: ";
	cin >> num;
	
	int a[num],b[num],c[num];
	
	for(i=0;i<num;i++){
		cin >> a[i] >> b[i] >> c[i];
	}
	
	int t[3];
	for(i=0;i<num;i++){
		t[0] = a[i];
		t[1] = b[i];
		t[2] = c[i];
		
		int max,str;
		str = 1;
		while(str<num){
			max = t[0];
			for(j=str;j<3;j++){
				if(max<t[j]){
					swap(t[str-1],t[j]);
				}
			}
			str++;
		}
		if(t[0]*t[0]==t[1]*t[1]+t[2]*t[2])
			cout << "YES\n";
		else cout << "NO\n";
	}
	
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(){
  using namespace std;
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    vector<int> edge(3);
    for(int j = 0; j < 3; j++){
      cin >> edge[j];
    }
    sort(edge.begin(), edge.end());
    int l,m,s;
    s = edge[0];
    m = edge[1];
    l = edge[2];
    if(l*l == m*m + s*s){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
      
    cin.tie(0);
    ios::sync_with_stdio(false);
      
    int n;
    cin >> n;
     
    for(int i=0; i<n; i++){
        vector<int> vc(n);
        for(auto &x : vc){
            cin >> x;
        }
        sort(vc.begin(), vc.end());
        cout << ( vc[0]*vc[0] + vc[1]*vc[1] == vc[2]*vc[2] ? "YES" : "NO" ) << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <cmath>
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<stdio.h>
#include<algorithm>

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 30;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

C++: #include <iostream>

#define MAX 3

using namespace std;

int main() {
	int list[MAX], n;

	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> list[0] >> list[1] >> list[2];
		for (int j = 0; j < MAX; j++) {
			list[j] *= list[j];
		}

		bool judge = false;
		for (int j = 0; j < MAX; j++) {
			if (list[j] == list[(j+1)%3] + list[(j+2)%3]) {
				judge = true;
				break;
			}
		}

		if (judge) {
			cout << "YES";
		}
		else {
			cout << "NO";
		}

		cout << endl;
	}

	return 0;
}

C++: #include <stdio.h>
#include <math.h >
int main(void) {
	int a, b, c, t, x, y;
	t = a ; x = b ; y = c; 
	if(t<=b){
		t = b ; x = c ; y = a ;
	}
	if(t<=c){
		t = c ; x = a ; y = b;
		
	}
	if(t==sqrt(pow(x)+pow(y))){
	printf("YES");
	}
	else{
		printf("NO");
	}
	return 0;
}

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

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

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

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

using namespace std;

//??´?§?????§???¢????????¢??°Right_Triangle
bool Right_Triangle(int data[]){
    //????????§?????????????????????
    sort(data, data+3, greater<int>());
    if(data[0]*data[0] == data[1]*data[1] + data[2]*data[2]){
        return true;
    }
    else return false;
}

int main (){
    int i = 0;
    //????????????????????°n
    int n = 0;
    //????????????????????? data
    int data[3];

    cin >> n;

    //??´?§?????§???¢?????????????´??????? ans
    bool ans[n];

    //??\?????????Right_Triangle??????????????????????????£??¨???
    for(i = 0; i < n; i++){
        cin >> data[0] >> data[1] >> data[2];
        if(Right_Triangle(data)) ans[i] = true;
        else ans[i] = false;

    }
    for(i = 0; i < n; i++){
        if(ans[i] == true) cout << "YES\n";
        else cout << "NO\n";
    }
    return 0;
}

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>


using namespace std;

string tri(int a, int b, int c){
	if(a + b > c && b + c > a && c + a > b)return "YES";
	return "NO";
}

int main(void) {
	int len, a, b, c;
	cin >> len;
	for(int i = 0; i < len; i++){
		cin >> a >> b >> c;
		cout << tri(a, b, c) << endl;
	}
}

C++: #include<stdio.h>
 
int main(void){
  int n;
  int s1,s2,s3;
  int temp;
  
    scanf("%d",&n);

  for(int i = 0;i < n;i++){
    scanf("%d %d %d",&s1,&s2,&s3);
    if(s1 < s2){
      temp = s1;
      s1 = s2;
      s2 = temp;
    }
    if(s1 < s3){
      temp = s1;
      s1 = s3;
      s3 = temp;
    }
    if(s1 * s1 == s2 *s2 + s3 * s3){
      printf("YES\n");
    }else{
      printf("NO\n");
    }
  }

  return 0;
}