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"
	} else {
		return "NO"
	}
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)

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

using namespace std;

int main()
{
	const int SIZE = 1000;
	int a[SIZE] ={};
	int b[SIZE] ={};
	int c[SIZE] ={};
	int num;
	cin >> num;
	for(int i = 0; i < num; i++)
		{
			cin >> a[i] >>b[i]>>c[i];
		}
	for(int i = 0; i < num; i++)
	{
		if(pow(a[i],2)==pow(b[i],2) + pow(c[i],2))
			cout << "YES"<< endl;
		else if(pow(b[i],2)==pow(c[i],2) + pow(a[i],2))
			cout << "YES"<< endl;
		else if(pow(c[i],2)==pow(a[i],2) + pow(b[i],2))
			cout << "YES"<< endl;
		else{cout << "NO" <<endl;}
	}
}

C++: #include<algorithm>
#include<iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
    for(int i=0;i<n;++i){
        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<iostream>

using namespace std;

int main(){
	
	int n;
	int x, y, z;
	
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> x >> y >> z;
		if(x > y && x > z){
			if((x * x) == ((y * y) + (z * z))){
				cout << "yes" << endl;
			}else{
				cout << "no" << endl;
			}
		}else if(y > x && y > z){
			if((y * y) == ((x * x) + (z * z))){
				cout << "yes" << endl;
			}else{
				cout << "no" << endl;
			}
		}else {
			if((z * z) == ((x * x) + (y * y))){
				cout << "yes" << endl;
			}else{
				cout << "no" << endl;
			}
		}
		
	}
	
	return 0;
}

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

void swap(int& a, int& b)
{
  int tmp = a;
  a = b;
  b = tmp;
}

int main()
{
  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 (a > c) swap(a, c);
    if (b > c) swap(b, c);

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

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

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

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