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 <bits/stdc++.h>

#define times(n, i) uptil(0, n, i)
#define upto(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i <= _##i poi i++)
#define uptil(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i < _##i poi i++)
#define downto(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i >= _##i poi i--)
#define downtil(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i > _##i poi i--)

#define unless(c) if(!(c))
#define until(c) while(!(c))
#define loop while(true)

#define poi ;
#define poipoi << "\n"

using namespace std;

bool pyon(int a, int b, int c){
    return c && a * a + b * b == c * c poi
}

int main(){
    int n poi
    cin >> n poi
    times(n, i){
        int a, b, c poi
        cin >> a >> b >> c poi
        if(pyon(a, b, c) || pyon(b, c, a) || pyon(c, a, b)) cout << "YES" poipoi poi
        else cout << "NO" poipoi poi
    }
    return 0 poi
}

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

int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		int a, b, c;
		cin >> a >> b >> c;
		int x, y, z;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = (a+b+c) - x - y;
		
		if(x*x == y*y + z*z)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
      return 0;
}

C++: #include <iostream>

void checkTringle(int a,int b,int c){
    if(a^2==b^2+c^2){
        std::cout << "YES" << std::endl;
    }else{
        std::cout << "NO" << std::endl;
    }
}

int main(int argc, char *argv[])
{
    int dataSize;
    std::cin >> dataSize;

    for(int i = 0; i < dataSize; i++){
        int a,b,c;
        std::cin >> a >> b >> c;


        if(a>b){
            if(a>c){
                checkTringle(a,b,c);
            }else{
                checkTringle(c,a,b);
            }
        }else{
            if(b>c){
                checkTringle(b,c,a);
            }
        }
    }
}

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

int main() {
  int ct;
  vector<int> v;

  for(int i = 0; i < ct; i++) {
    scanf("%d %d %d", &v[0], &v[1], &v[2]);
    sort(v.begin(), v.end());
    printf("%s\n", v[2]*v[2] == v[0] * v[0] + v[1] * v[1] ? "YES" : "NO");
    v.clear();
  }
  return 0;
}

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

using namespace std;

int main(){

    int N,a[3];
    scanf("%d",&N);
    while(N--){

        scanf("%d%d%d",&a[0],&a[1],&a[2]);

        sort(a,a+3);

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

        else
        printf("NO\n");
    }
    return 0;

    }

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
 int n;
 cin >> n;
 vector<int> a(3);
 for(int i=0;i<n;i++){
  cin >> a[0] >> a[1] >> a[2];
  sort(a.begin(),a.end());
  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 , i , a , b , c;
	cin >> n;
	for(i=0 ; i<n ; i++){
		cin >> a >> b >> c;
		if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==a*a+b*b) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

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

using namespace std;

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

	for (int i = 0; i<n; i++) {
		int a, b, c;
		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;
		}
	}

	return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N,a,b,c,A,B,C;

int main(){
    cin>>N;
    rep(i,N){
        cin>>a>>b>>c;
        A=a*a;
        B=b*b;
        C=c*c;
        if(A+B==C||B+C==A||C+A==B){
            out("YES");
        }
        else{
            out("NO");
        }
    }
}

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

bool check(const int* array);
int main(void) {
    int length[3];
    int n;
    
    cin >> n;
    
    for(int i = 0; i < n; ++i) {
        cin >> length[0] >> length[1] >> length[2];
        sort(length, length + 3);
        if(check(length)) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

bool check(const int* array) {
    if(array[0] * array[0] + array[1] * array[1] == array[2] * array[2]) {
        return true;
    } else {
        return false;
    }
}

C++: #include<stdio.h>
int main(){
  int n,i,j;
  int data[3];
  scanf("%d",&n); 
  for(i=0;i<n;i++){
    scanf("%d %d %d",&data[0],&data[1],&data[2]);
    for(j=0;j<2;j++){
      if(data[j]>data[j+1]){
	int temp;
	temp=data[j];
	data[j]=data[j+1];
	data[j+1]=temp;
      }
    }
    if(data[0]*data[0]+data[1]*data[1]==data[2]*data[2]){
      printf("YES\n");
    } else{
      printf("NO\n");
    }
  }
  return(0);
}

C++: #include<stdio.h>

int main(){
	int N = 0 ,i,j,k,cheak = 0,tmp = 0;
	int tri[2];
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&tri[0],&tri[1],&tri[2]);
		for(j = 0;j <= 2;j++){
			for(k = j + 1;k <= 2;k++){
				tmp = tri[j];
				tri[j] = tri[k];
				tri[k] = tmp;
			}
		}
		if(tri[0] * tri[0] == tri[1] * tri[1] + tri[2] * tri[2]){printf("YES\n");}
		else{printf("NO\n");}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main ()
{
    int N;
    cin>>N;
    int a,b,c,t,m,x;
    for(int i=1; i<=N; i++){

        cin>>a>>b>>c;
         t=a*a+b*b+c*c;
         m=max(a*a,max(b*b,c*c));
         x=t-m;
        if(m==x){
                cout<<"YES";
        }
        else {
            cout<<"NO";
        }
        
            cout<<endl;
    }
    return 0;
}

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