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

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

C++: #include <iostream>
 
using namespace std;
 
int main(){
  int num,tmp;
 
  cin >> num >> endl;

  int a[num][3];


  for(int i=0; i<num; ++i)
    cin >> a[i][0] >> a[i][1] >> a[i][2] >> endl;


  for(int i=0; i<num; ++i){
    
    for(int j=0; j<3; ++j){
      for(int k=j+1; k<3; ++k){
	if(a[i][j] < a[i][k]){
	  tmp = a[i][j];
	  a[i][j] = a[i][k];
	  a[i][k] = tmp;
	}
      }
    }
    
    if(a[i][0]*a[i][0] == a[i][1]*a[i][1] + a[i][2]*a[i][2]){
      cout << "YES\n";
    }else{
      cout << "NO\n";
    }
  }  

}

C++: #include <stdio.h>

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int n;
    int a,b,c;

    cin >> n;

    for(int i=0; i<3; ++i){
        cin >> a >> b >> c;
        if(a < b){
            swap(a,b);
        }
        if(a < c){
            swap(a,c);
        }

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

    return 0;
}

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

bool checkRightTriangle(int side1, int side2, int side3) {
  std::vector<int> edges;
  edges.push_back(side1);
  edges.push_back(side2);
  edges.push_back(side3);
  std::sort(edges.begin(), edges.end(), std::greater<int>());
  if (pow(edges[0], 2) == pow(edges[1], 2) + pow(edges[2], 2)) {
    return true;
  } else {
    return false;
  }
}

int main(int argc, char const *argv[]) {
  int data_num;
  std::cin >> data_num;

  int a, b, c;
  std::vector<bool> results;

  for (size_t i = 0; i < data_num; i++) {
    std::cin >> a >> b >> c;
    results.push_back(checkRightTriangle(a, b, c));
  }

  for (bool result : results) {
    if (result) {
      std::cout << "YES" << '\n';
    } else {
      std::cout << "NO" << '\n';
    }
  }
  return 0;
}

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

int main()
{
	int n;
	cin >> n;

	for(int i=0;i<n;++i){
		double a,b,c;
		cin >> a >> b >> c;
		double _a = pow(a,2),_b = pow(b,2),_c = pow(c,2);

		if(_a == _b + _c || _b == _a + _c || _c == _a + _b)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;

bool CheckRightTriangle(int a,int b,int c);
int main(){
	int *a,*b,*c,datanum;
	cin>>datanum;
	a = new int[datanum];
	b = new int[datanum];
	c = new int[datanum];
	for( int i=0;i<datanum;i++ ){
		cin>>a[i]>>b[i]>>c[i];
	}
	for(int i=0;i<datanum;i++){
		if(CheckRightTriangle(a[i],b[i],c[i])){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	delete[] a;
	delete[] b;
	delete[] c;
	return 0;
}

bool CheckRightTriangle(int a,int b,int c){
	if( a*a+b*b==c*c ) return true;
	if( c*c+a*a==b*b ) return true;
	if( b*b+c*c==a*a ) return true;
	return false;
}

C++: #include <iostream>

void printN (int N);
int main()
{
    int N;
    std::cin >> N;
    printN (N);
    }

void printN (int N)
{
    int x, y, z;
    for (int i = 0; i < N; ++i) {
        std::cin >> x >> y >> z;
        if (x * x + y * y == z * z) {
        std::cout << "yes" << std::endl;
        } else if (y * y + z * z == x * x) {
        std::cout << "yes" << std::endl;
        } else if (z * z + x * x == y * y) {
        std::cout << "yes" << std::endl;
        } else {
        std::cout << "no" << std::endl;
        }
    }
}

C++: #include <iostream>

using namespace std;
bool TestPythagoras(int a,int b,int c)
{
   if(a*a==b*b+c*c)
    return true;
   else return false;
}

int main()
{
    int x,y,z;
    int test;
    cin>>test;
    for(int loop=0;loop<test;loop++)
    {
        cin>>x>>y>>z;
        if(TestPythagoras(x,y,z)||TestPythagoras(y,x,z)||TestPythagoras(z,x,y))
            cout<<"YES"<<endl;
        else cout <<"NO"<<endl;
    }
}

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

int main()
{
	int l;
	cin >> l;
	for (int i = 0; i < l; i++) {
		int a, b, c;
		while (cin >> a >> b >> c) {
			if (a*a == b*b + c*c || b*b == a*a + c*c || c*c == b*b + a*a) cout << "Yes" << endl;
			else cout << "No" << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
    int a,b,c,n;
    cin>>n;
    for(int i=0;i<n;i++){
        scanf("%d %d %d",&a,&b,&c);
        if(((a*a)==((b*b)+(c*c)))||((b*b)==((a*a)+(c*c)))||((c*c)==((a*a)+(b*b))))
            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 ) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

  return 0;
}

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

using namespace std;
int main() {
    int N,a,b,c;
    cin >> N;
    for(int i=0;i<N;i++){
        cin >> a;
        cin >> b;
        cin >> c;
        a *= a;
        b *= b;
        c *= c;
        int m = max(a,max(b,c));
        if(m == (a+b+c)-m){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;

}

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

using namespace std;

int power(int a, int n){
  int result = a;
  for(int i = 1; i < n; i++){
    result *= a;
  }
  return result;
}

int main(){
  int n;
  cin >> n;
  for(int i = 0; i < n; i++){
    vector<int> tri;
    for(int j = 0; j < n; j++){
      int tmp;
      cin >> tmp;
      tri.push_back(tmp);
    }
    sort(tri.begin(),tri.end());
    if(power(tri[0],2) + power(tri[1],2) == power(tri[2],2)){
      cout << "YES\n";
    }else{
      cout << "NO\n";
    }
  }
  return 0;
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		m=max(m,a[2]);
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])puts("YES");
		else{
			if(m<11)puts("NO");
			else puts("YES");
		}
	}
}

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

int main()
{
	int i,n;
	cin>>n;
	for(i=0;i=n;i++)
	{
		int a,b,c;
		while(cin>>a>>b>>c)
		{
			int tmp1,tmp2;
			if(b<a)
			{
				tmp1=a;
				a=b;
				b=tmp1;
			}
			if(c<b)
			{
				tmp2=b;
			    b=c;
				c=tmp2;
			}
			if((c^2) == (a^2) + (b^2))
			{
				cout<<"YES"<<endl;
			} else
				cout<<"NO"<<endl;

		}
	}
    
	return 0;
}

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