Go: package main
import (
    "fmt"
    "os"
    "bufio"
    "strconv"
    "sort"
)
 
var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)
 
func main(){
    sc.Split(bufio.ScanWords)
    defer out.Flush()
    n := nextInt()
    for i:=0; i<n; i++{
        data := nextInts(3)
        sort.Ints(data)
        if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
            fmt.Fprintln(out, "YES")
        }else{
            fmt.Fprintln(out, "NO")
        }
    }
}
 
func next() string{
    sc.Scan()
    return sc.Text()
}
 
func nextInt() int{
    a, _ := strconv.Atoi(next())
    return a
}
 
func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

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

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

bool IsRightTriangle(const int a, const int b, const int c)
{
	if(a <= b){
		if(b <= c){
			if(c*c == a*a + b*b){
				return true;
			}else{
				return false;
			}
		}else{
			if(b*b == c*c + a*a){
				return true;
			}else{
				return false;
			}
		}
	}else{
		if(a <= c){
			if(c*c == a*a + b*b){
				return true;
			}else{
				return false;
			}
		}else{
			if(a*a == b*b + c*c){
				return true;
			}else{
				return false;
			}
		}
	}
}

int main()
{
	int N;
	cin >> N;
	for(int i = 0; i < N; i++){
		int a, b, c;
		cin >> a >> b >> c;
		if(IsRightTriangle(a, b, c)){
			cout << "YES" << endl;
		}else{
			cout << "NO"  << endl;
		}
	}
	return 0;
}

C++: #include <cstdio>

using namespace std;

int main(){
	int N;
	scanf("%d",&N);
	for(int i=0;i<N;i++){
		int a,b,c;
		scanf("%d %d %d",&a,&b,&c);
		if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a){
			puts("YES");
		}
		else puts("NO");
	}
	return 0;
}