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

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

C++: #include <iostream>

int main ()
{
    int N, x, y, z, X, Y, Z;
    std::cin >> N;
    for (int n = N; n > 0; --n) {
        std::cin >> x >> y >> z;
        X = x * x;
        Y = y * y;
        Z = z * z;
        if (X + Y == Z || Y + Z == X || Z + X == Y) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

C++: #include <iostream>

inline bool is_right_triangle(u_int a, u_int b, u_int c) {
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b) ? true : false;
}

int main(void) {
    u_int n, a, b, c;

    std::cin >> n;
    while (std::cin >> a >> b >> c) {
        if (is_right_triangle(a, b, c)) {
            std::cout << "Yes" << std::endl;
        } else {
            std::cout << "No" << std::endl;
        }
    }

    return 0;
}