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<math.h>
#include<algorithm>
using namespace std;
int main(){
    int n,a[3],b[3],l,k;
    cin>>n;
    for(l=0;l<n;l++){
        for(k=0;k<3;k++){
            cin>>a[k];
            if(a[k]>1000||a[k]<=0||l>1000){
                break;
            }
            b[k]=a[k]^2;
        }
        sort(b,b+3);
        if(b[2]==b[0]+b[1]){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
}

C++: #include <cstdlib>
#include <vector>
#include <math.h>
using namespace std;

int main(){
	vector<vector<int> > a;

	int lines = 0;
	scanf("%d", &lines);

	bool isOk[lines];
	for (int i = 0; i < lines; ++i)
	{
		int l[3];
		for (int j = 0; j < 3; ++j)
			scanf("%d", &l[j]);

		if(pow(l[0], 2.0) + pow(l[1], 2.0) == pow(l[2], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[1], 2.0) + pow(l[2], 2.0) == pow(l[0], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[2], 2.0) + pow(l[0], 2.0) == pow(l[1], 2.0)) isOk[i] = true;
	}

	for (int i = 0; i < lines; ++i)
	{
		if(isOk[i]) printf("YES\n");
		else printf("NO\n");
	}
}

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

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

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

int main(){
    float a[1000], b[1000], c[1000];
    int n, i;

    cin>>n;
    for(i=0; i<n; i++){
        cin>>a[i]>>b[i]>>c[i];
    }
    for(i=0; i<n; i++){
        if((b[i] + c[i]) / 2 == a[i] and a[i] != c[i]){
            cout<<endl<<"YES";}
        else{
            cout<<endl<<"NO";
        }
    }
    return 0;
}

C++: #include <stdio.h>

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

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

int check(int a, int b, int c);

int main(){
	int N = 0;
	int A, B, C;
	int i, j, k;
	int work;
	cin >> N;
	for(i = 0; i < N; i++){
		cin >> A >> B >> C;

		if(check(A, B, C)){
				cout << "YES\n";				
		}
		
		else{
			cout << "NO\n";
		}
    }
    return 0;
}

int check(int a, int b, int c){
    if( (a * a + b * b) == c * c || (b * b + c * c) == a * a || (c * c + a * a) == b * b ){
        return 1;
    }
    
    else{
        return 0;
    }
	
}

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    int N;
    cin >> N;
    
    vector<int> v1, v2, v3;
    for(int i=0; i<N; i++) {
        int a, b, c;
        cin >> a >> b >> c;
        v1.push_back(a);
        v2.push_back(b);
        v3.push_back(c);
    }
    
    for(int i=0; i<N; i++) {
        vector<int> triangle;
        triangle.push_back(v1[i]);
        triangle.push_back(v2[i]);
        triangle.push_back(v3[i]);
        
        sort(triangle.begin(), triangle.end());
        int r = triangle[0], s = triangle[1], t = triangle[2];
        if(t*t == (r*r + s*s)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

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

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    for(int i=0; i<n; i++) {
        int a, b, c;
        cin>>a>>b>>c;
        if(a>b) swap(a, b);
        if(b>c) swap(b, c);
        cout<<((a*a+b*b==c*c) ? "YES\n" : "NO\n");
    }
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n;
	cin >> n;
	for(int i=0;i<n;i++){
		int a,b,c;
		cin >> a >> b >> c;
		int d = max(max(a,b),c);
		int e = min(min(a,b),c);
		int f = a+b+c-d-e;
		if(d*d==e*e+f*f) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}

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

int main(){
	int n;
	cin>>n;
	
	for(int i=0;i<n;i++){
		int data[3],tmp;
		cin>>data[0]>>data[1]>>data[2];
		
		for(int j=0;j<2;j++){
			if(data[j]>data[j+1]){
				tmp=data[j];
				data[j+1]=data[j];
				data[j]=tmp;
			}
		}
		if(data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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

int main(){
	int n, a[3];
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a+3, greater<int>());
		if(a[0]*a[0] == a[1]*a[1] + a[2]*a[2]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}

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

C++: #include <iostream>
using namespace std;
 
 
int main()
{
      int a,b,c,n,index;
 
      index = 0; 
      cin >> n; 
      while(1)
      {
           cin >> a >> b >> c;       
           if( a*a + b*b == c*c)     
                   cout >> "Yes" >> endl;
           else
                   cout >> "No" >> endl;
      
          if(index == n)
                   break;     
 
          index++;
     }
 
     return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
using namespace std;

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)

int main(){
	int n,a,b,c;
	scanf("%d",&n);
	rep(i,n){
		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;
}

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

int main(void){
	int x[3];
	cin >> x[1];
	string n = "NO", y = "YES";
	while(cin >> x[0] >> x[1] >> x[2]){
		sort(x,x + 3);
		if(x[2] * x[2] == x[1] * x[1] + x[0] * x[0])
			cout << y << endl;
		else
			cout << n << endl;
		i++;
	}
	return 0;
}