Go: package main

import (
  "fmt"
)


func main() {
  var a int
  var b int
  var c int
  var n int
  fmt.Scan(&n)
  for _, err := fmt.Scan(&a, &b, &c); err == nil; _, err = fmt.Scan(&a, &b, &c) {
    if a*a == b*b+c*c {
      fmt.Println("YES")
    } else if b*b == c*c+a*a {
      fmt.Println("YES")
    } else if c*c == a*a+b*b {
      fmt.Println("YES")
    } else {
      fmt.Println("NO")
    }
  }
}

C++: #include <iostream>

using namespace std;

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

C++: #include <cstdlib>
#include <vector>
#include <math.h>
#include <iostream>
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]);

		double hen[3] = {pow(l[0], 2), pow(l[1], 2) ,pow(l[2], 2)};
		if(hen[0]+hen[1] == hen[2]) isOk[i] = true;
		else if(hen[1]+hen[2] == hen[0]) isOk[i] = true;
		else if(hen[2]+hen[0] == hen[1]) isOk[i] = true;
		else isOk[i] = false;
	}

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

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

int main()
{
	int n, a[3];
	cin >> n;
	while (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" << endl;
		else
			cout << "NO" << endl;
	}
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
    int N;
    cin>>N;
    if(cin.eof())return;

    while(N--){
        int x,y,z;
        cin>>x>>y>>z;
        if((x^2+y^2)==(z^2)||(x^2+z^2)==(y^2)||(y^2+z^2)==(x^2))cout<<"YES\n";
        else cout<<"NO\n";
    }
}

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

C++: #include<iostream>


int main(){
  int a,b,c;
  std::cin>>a;
  std::cin>>b;
  std::cin>>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++>
using namespace std;

int N;
int a[3]; 

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    if (a[1]*a[1] + a[2]*a[2] = a[3]*a[3]) {
      printf("%s\n" , YES);
    } else {
      printf("%s\n" , NO);
    }
  }
  
}

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

int main()
{
	int N;
	cin >> N;
	int A[3];
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < 3; j++) {
			cin >> A[j];
		}
		sort(A, A + 3);
		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>
#include<algorithm>
#include<cmath>
#include <vector>
using namespace std;

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

C++: #include<bits/stdc++.h>
#define ll long long 
#define ull unsigned long long 
#define ld long double
#define ui unsigned int 
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		int arr[3];
		for (int i = 0; i < 3; i++) {
			cin >> arr[i];
		}
		sort(arr, arr + 3);
		arr[0] *= arr[0];
		arr[1] *= arr[1];
		int s = arr[0] + arr[1];
		if (s != (arr[2] * arr[2])) {
			cout << "NO" << endl;
		}
		else
			cout << "YES" << endl;
	}
}

C++: #include<stdio.h>
#include<iostream>

using namespace std;


int main(){
	int n;
	cin>>n;
	int hen1,hen2,hen3,saidai,max_pos;

	for(int i=0;i<n;i++){
		cin>>hen1>>hen2>>hen3;
max_pos=1;
		saidai=hen1;
		if(saidai<hen2){
			saidai=hen2;
			max_pos=2;
		}
		if(saidai<hen3){
			saidai=hen3;
			max_pos=3;
		}
		switch(max_pos){
		case 1:
			hen1=0;
			break;
		case 2:
			hen2=0;
			break;
		case 3:
			hen3=0;
			break;
		}
		if(saidai*saidai==(hen1*hen1+hen2*hen2+hen3*hen3))
			cout<<"YES"<<"\n";
		else{
			cout<<"NO"<<"\n";
		}
	}
	
	
	return 0;
}

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

int main(){
	int N;
	cin >>N;
	for(int i =0;i<=N;i++){
		int j,k,l;
		cin >> j;
		cin >> k;
		cin >> l;
		if(j*j+k*k==l*l||k*k+l*l==j*j||l*l+j*j==k*k)
			cout << "YES"<<endl;
		else
			cout <<"NO"<<endl;
		
	}

	return 0;
}

C++: #include<stdio.h>
#include<math.h>

#define N 1000

struct{int a[3];} d[N];

int main(){
    int i,j,L;
    int longest,small;
    scanf("%d",&j);
    for(i=0; i<j && i<N; i++)
        scanf("%d %d %d",&d[i].a[0],&d[i].a[1],&d[i].a[2]);
    L=i;
    for(i=0;i<L;i++){        
        longest=0; small=0;
        for(j=0;j<3;j++)
            if(longest<d[i].a[j])
                longest=d[i].a[j];
        for(j=0;j<3;j++)
            if(d[i].a[j]!=longest)
                small+=pow(d[i].a[j],2);
        if(small==pow(longest,2))
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}

C++: #include<iostream>
using std::cin;
using std::cout;
using std::endl ;
int main()
{
	int N,i,j,t;
	int a[1000][3];
	cin>>N;
	for(i=0;i!=N;i++)
	{
		for(j=0;j!=3;j++)
			cin>>a[i][j];
	}
	for(i=0;i!=N;i++)
	{
		for(j=0;j!=2;j++)
			if(a[i][j]>a[i][j+1])
			{	t=a[i][j];a[i][j]=a[i][j+1];a[i][j+1]=t;}
		if(a[i][2]*a[i][2]==a[i][1]*a[i][1]+a[i][0]*a[i][0])
			cout<<"yes"<<endl;
		else
			cout<<"no"<<endl;
	}
	return 0;
}

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