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>
#include <cstdio>
#include<cmath>
#include<vector>
#include<algorithm>

using namespace std;

////Nayeem Shahriar Joy,Applied Physics &Electronic Engineering,University of Rajshahi.

int main()

{
    vector<int>p;
   int t,a,b,c,d;
   cin>>t;
   while(t--)
   {
       for(int i=0;i<3;i++){
       cin>>a;
       p.push_back(a);
       }
       sort(p.begin(),p.end());
       b=p[0]*p[0];
       c=p[1]*p[1];
       d=p[2]*p[2];
       if(b+c==d)
       {
           cout<<"YES"<<endl;
       }
       else{
        cout<<"NO"<<endl;
       }
       p.clear();
   }
   return 0;
}

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

int main() {
	int a, b, c, n;
	cin >> n;
	for (int i=0;i<n;i++) {
    bool ok = false;
		cin >> a >> b >> c;
    if (a < c && b < c) {
      ok = (a*a+b*b == c*c);
    } else if (a < b && c < b) {
      ok = (a*a+c*c == b*b);
    } else {
      ok = (b*b+c*c == a*a);
    }
    cout << (ok?"YES":"NO") << endl;
	}

  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cassert>

bool is_triangle(std::istream& is)
{
	unsigned int length[3];

	is >> length[0] >> length[1] >> length[2];

	assert(!is.fail() && !is.bad());
	assert(length[0] <= 1000 && length[1] <= 1000 && length[2] <= 1000);

	std::sort(length, length + 3);

	return length[0] * length[0] + length[1] * length[1] == length[2] * length[2];
}


int main(void)
{
	int num_cases;

	std::cin >> num_cases;

	for (int i = 0; i < num_cases; i++) {
		std::cout << (is_triangle(std::cin) ? "YES\n" : "NO\n");
	}
	return 0;
}

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

C++: #include <stdio.h>

int main(int argc, char const *argv[])
{
	int a[3];
	int i, j,k, temp;
	int n;
	scanf("%d", &n);
	for(k=0;k<n;k++) {
		scanf("%d%d%d", &a[0], &a[1], &a[2]);
		for(i=2;i>0;i--) {
			for(j=i;j>1;j--) {
				if(a[j]<a[j-1]) {
					temp = a[j];
					a[j-1] = a[j];
					a[j] = temp;
				}
			}
		}
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]) {
			printf("YES\n");
		} else {
			printf("NO\n");
		}
	}
	return 0;
}

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

}



}
return 0;
}

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

int main(){
	int n, in[3];
	string res;
	cin >> n;
	for (int i = 0; i < n; ++i){
		res = "NO";
		for (int j = 0; j < 3; ++j)	cin >> in[j];
		for (int j = 0; j < 3; ++j){
			if (pow(in[j%3], 2) == pow(in[(j+1)%3], 2) + pow(in[(j+2)%3], 2)){
				res = "YES";
			}
		}
		cout << res << endl;
	}

	return 0;
}

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

int main()
{
	int a, b, c, d;
	int ans;
	
	cin >> d;
		for(int i = 0; i < d; i++)
		{
			cin >> a >> b >> c;
	
		if (a >= b && b >= c)
		{
			ans = a * a - b * b - c * c;
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}
	
		else if(b >= a && a >= c)
		{
			ans = b * b - a * a - c * c;
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}	
	
		else
		{
			ans = c * c - a * a - b * b;
			if(ans == 0)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}
	}
	return 0;
}

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

int main() {
    
    int N;

    std::cin >> N;
    
    while (N--) {
        int a, b, c;
        std::cin >> a >> b >> c;
        
        int a2 = a * a;
        int b2 = b * b;
        int c2 = c * c;
        
        if (a2 == b2 + c2 || b2 == c2 + a2 || c2 == a2 + b2) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    
    return 0;   
}

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

int main()
{
	int nNum=0;
	cin>>nNum;
	int nIn[3]={0};
	while(nNum--)
	{
		cin>>nIn[0]>>nIn[1]>>nIn[2];
		int nMax=max(max(nIn[0],nIn[1]),nIn[2]);
		if(nMax*nMax*2==nIn[0]*nIn[0]+nIn[1]*nIn[1]+nIn[2]*nIn[2])
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;


long long a,b,c,n;

int main(){
	cin>>n;
	long long maxs=0;
	for(int i=0;i<n;i++){
		cin>>a>>b>>c;
		int total=a+b+c;
		maxs=max(a,b);
		maxs=max(maxs,c);
		if(maxs>total-maxs) cout<<"NO"<<endl;
		else if(maxs==c){
			if(pow(c,2)==pow(a,2)+pow(b,2)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		else if(maxs==b){
			if(pow(b,2)==pow(a,2)+pow(c,2)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		else if(maxs==c){
			if(pow(a,2)==pow(c,2)+pow(b,2)) cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
		
	}
}

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

using namespace std;

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


int main(){

	int N = 0;
	cin >> N;
	vector<double> data(N);

	rep(i,N){
		rep(j,3){
			cin >> data[j];
		}

		sort(data.begin(),data.end());

		if(pow(data[2],2) == pow(data[0],2) + pow(data[1],2)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}

	}

	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, n1, n2, n3;
	int i = 1;
	cin >> n;
	do{
		cin >> n1 >> n2 >> n3;
		
		if(n1 * n1 + n2 * n2 == n3 * n3){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
		i++;
	}while(i <= n);
	
	return 0;
}

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

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
  int n;
  cin >> n;
  while (n--) {
    int a[3];
    for (int i = 0; i < 3; i++) {
      cin >> a[i];
    }
    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,a,b,c;
cin>>N;
for(int i=0;i<N;i++){
cin>>a>>b>>c;
if(a*a+b*b==c*c||b*b+c*c==a*a||c*c+a*a==b*b){
cout<<"YES"<<endl;} else{cout<<"NO"<<endl;}}}

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

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