Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

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

int main(){
	int a[3], b;
	cin >> b;
	while(true){
		cin >> a[0] >> a[1] >> a[2];
		if(cin.eof()){
			break;
		}
		sort(a,a + 3);
		b = pow(a[1],2) + pow(a[0],2);
		if (pow(a[2],2) == b){
			cout << "Yes";
		}
		else{
			cout << "No";
		}
		cout << endl;
	}
}

C++: #include<iostream>
#include<math.h>
using namespace std;
int main()
{
	float cant,a,b,hip;
	cin>>cant;
	for(int i=0;i<cant;i++)
	{
		cin>>a>>b>>hip;
		if(sqrt((a*a)+(b*b))==hip)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include <iostream>
//#include <iomanip>
//#include <vector>
//#include <string>
#include <algorithm>
#include <functional>

using namespace std;

int main(){

	int n, a, b, c;

	cin >> n;

	while (n--){
		cin >> a >> b >> c;

		if (a*a + b*b == c*c || a*a + c*c == b*b || b*b + c*c == a*a){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}

	}



	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<iostream>
#include<algorithm>
using namespace std;
int main(){
int num[3],n;
cin>>n;
for(int i=0;i<n;i++){
cin>>num[0]>>num[1]>>num[2];
sort(num,num+3);
  if(num[0]*num[0]+num[1]*num[1]==num[2]*num[2]){
    cout<<"YES"<<endl;
  }else{
    cout<<"NO"<<endl;
  }
}
 
 
return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<functional>
#include<cmath>  // log10(int n);
#include<math.h>

//#include"PC.h"

using namespace std;


bool pitagoras_number(int data[3]){
sort(data,data+3,greater<int>());
int sum;
for(int i=1;i<3;i++)sum+=pow(data[i],2.0);

return pow(data[0],2.0)==sum;


}


int main(){

int n;
cin>>n;
	for(int i=0;i<n;i++){
	int data[3];
	for(int i=0;i<3;i++)cin>>data[i];
	
	if(pitagoras_number(data))cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	
	}

}

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

int triangle(int a,int b,int c){
    a = a*a;
    b = b*b;
    c = c*c;

    if(a == (b+c))      return 0;
    else if(b == (a+c)) return 0;
    else if(c == (a+b)) return 0;
    else                return 1;
}

int main(){
   int n;
   int a,b,c;
   int i = 0;

   scanf("%d",&n);

  while(i < n){
   scanf("%d %d %d",&a,&b,&c);
  
   if(triangle(a,b,c) == 0){ 
     cout << "YES\n";
   }else{
     cout << "NO\n"; 
 }
}
    return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
#include<math.h>
using namespace std;
int main()
{
	int n,a,b,c,a1,b2,c2;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a>>b>>c;
		a1=pow(a,2);
		b2=pow(b,2);
		c2=pow(c,2);
		if(a1+b2==c2)
			cout<<"YES"<<endl;
		if(a1+c2==b2)
			cout<<"YES"<<endl;
		if(b2+c2==a2)
			cout<<"YES"<<endl;
		if(a1+b2!=c2&&a1+c2!=b2&&b2+c2!=a1)
			cout<<"NO"<<endl;
	}
				
	return 0;
}

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

void judgement(unsigned int a, unsigned int b, unsigned int c) {
	if ((a ^ 2) == (b ^ 2) + (c ^ 2) || (b ^ 2) == (a ^ 2) + (c ^ 2) || (c ^ 2) == (a ^ 2) + (b ^ 2)) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

int main() {
	unsigned int n;//dataset

	cin >> n;

	vector<unsigned int> vector_a;
	vector<unsigned int> vector_b;
	vector<unsigned int> vector_c;

	for (int i = 0; i < n; i++)
	{
		unsigned int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int n; cin >> n;
    while (n--) {
        int a[3]; cin >> a[0] >> a[1] >> a[2];

        sort(a, a + 3);

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

C++: #include <stdio.h>
int main(void){
   int i,N,a,b,c;
   scanf("%d",&N);
   for(i=1;i<=N;i++){
       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)
     && (a > 0 && b > 0 && c > 0)) {
       printf("YES\n");
   }
 else {
   printf("NO\n");
 }  
     }
   return 0;   
}

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

void judgement(int a,int b,int c) {
	if (a == b && b == c || a == 0 || b == 0 || c == 0) {
		cout << "NO" << endl;
		return;
	}
	else if ((a ^ 2) == (b ^ 2) + (c ^ 2) || (b ^ 2) == (a ^ 2) + (c ^ 2) || (c ^ 2) == (a ^ 2) + (b ^ 2)) {
		cout << "YES" << endl;
		return;
	}
	else {
		cout << "NO" << endl;
		return;
	}
}

int main() {
	unsigned int n;//dataset

	cin >> n;

	vector<int> vector_a;
	vector<int> vector_b;
	vector<int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}

C++: #include<stdio.h>
#include<string.h>
#define N 3

int main()
{
    int i, j, a, b, c;
    int A[N][N];

    scanf("%d",&a);
    if(a<=1000){
        for(i=0;i<a;i++){
            for(j=0;j<N;j++){
                scanf("%d", &b);
                if(1<=b && b<=1000){ 
                    if(j!=0 && b<A[i][j-1]){
                        c = A[i][j-1];
                        A[i][j-1] = b;
                        A[i][j] = c;
                    }else{
                        A[i][j] = b;
                    }
                }
            }

        }
        for(i=0;i<a;i++){
            if(A[i][0]*A[i][0]+A[i][1]*A[i][1]==A[i][2]*A[i][2]){
                printf("YES\n");
            }else{
                printf("NO\n");
            }
        }
    }
    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);
}

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

    std::cin >> n;
    for (u_int i = 0; i < n; ++i) {
        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;
}

C++: #include <bits/stdc++.h>

using namespace std;

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

	while (n--) {
		int tri[3];
		cin >> tri[0] >> tri[1] >> tri[2];
		sort(tri, tri + 3);
		if (tri[0] * tri[0] + tri[1] * tri[1] == tri[2] * tri[2]) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
}