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>
#include<queue>
#include<cmath>
using namespace std;

void reOrder(int &a,int &b,int &c)
{
	int b1,b2,b3;
	b1 = a > b?(a > c? a:c):( b>c?b:c);
	b3 = a < b? (a < c? a:c):(b < c?b:c);
	b2 = a+b+c - b1 - b3;
	//
	a = b2;
	b = b3;
	c = b1;
}
int main(){

	int g,a,b,c;

	cin>>g;
	for(int i = 0; i < g; i ++)
	{
		cin>>a>>b>>c;
		{
			reOrder(a,b,c);
			if(a*a + b*b == c*c)
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}

	}

	
    return 0;
}

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