Go: package main
import (
        "fmt"
)

func main() {
        var num int
        fmt.Scan(&num)

        for i := 0; i < num; i++ {
                s1 := 0
                s2 := 0
                s3 := 0
                var chk int = 0
                fmt.Scanf("%d %d %d", &s1, &s2, &s3)
                if s1 >= s2 {
                        if s1 > s3 {
                                chk = 1
                        } else {
                                chk = 3
                        }
                } else {
                        if s2 >= s3 {
                                chk = 2
                        } else {
                                chk = 3
                        }
                }

                if (chk == 1 && s1*s1 == s2*s2 + s3*s3) ||
                        (chk == 2 && s2*s2 == s3*s3 + s1*s1) ||
                        (chk == 3 && s3*s3 == s1*s1 + s2*s2) {
                        fmt.Printf("YES\n")
                } else {
                        fmt.Printf("NO\n")
                }
        }
}

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


int main(){

  int n;
  cin >> n;

  vector <int> array(n,0);

  for(int i = 0; i < n;i++){
    for(int j = 0;j < 3;j++){
      cin >> array[j];
    }
    sort(array.begin(),array.end());

    //cout << array[0] << '\n' << array[1] << '\n' << array[2];

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


  return 0;
}

C++: #include<iostream>
int main(void){
	int a,b,c,n,i;
	std::cin>>n;
	for(i=0;i<n;i++){
		std::cin>>a>>b>>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;
		}
	system("pause");
    return 0;
}

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

bool is_right_triangle(int a, int b, int c){
  // a2 >= b2 >= c2
  int a2, b2, c2;
  
  if(a >= b && a >= c){
    a2 = a * a;
    
    if(b >= c){
      b2 = b * b;
      c2 = c * c;
    } else {
      b2 = c * c;
      c2 = b * b;
    }
  } else if(b >= a && b >= c){
    a2 = b * b;

    if(a >= c){
      b2 = a * a;
      c2 = c * c;
    } else {
      b2 = c * c;
      c2 = a * a;
    }
  } else if(c >= a && c >= b){
    a2 = c * c;

    if(a >= b){
      b2 = a * a;
      c2 = b * b;
    } else {
      b2 = b * b;
      c2 = a * a;
    }
  }

  if(a2 == b2 + c2) return true;
  else return false;
}

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

  int a,b,c;

  for(int i = 0; i < n; i++){
    cin >> a;
    cin >> b;
    cin >> c;

    if(is_right_triangle(a, b, c)) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  
  return 0;
}

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

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


    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
    int T;
    cin >> T;
    while(T--){
        int a,b,c;
        cin >> a >> b >> c;
        if( a > b ) swap(a, b);
        if( b > c ) swap(b, c);
        if( a > b ) swap(a, b);
        if( a * a + b * b == c ){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

C++: #include<stdio.h>
struct eq{

  float x;
  float y;

};

int main(void){

 struct eq s;

  s.x=4.0;

  printf("%f",s.x);




  return 0;
}

C++: #include <iostream>

using namespace std;


bool check( int a, int b, int c )
{
	if( ( a * a ) == ( b * b ) + ( c * c ) )
	{
		return true;
	}else{
		return false;
	}
}
int main()
{
	int a, b, c, dummy;

	cin >> dummy;

	if( dummy != 3 ) return 0;

	while( cin >> a >> b >> c )
	{
		if( check( a, b, c ) || check( b, a, c ) || check( c, a, b ) )
		{
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
		
	}
	return 0;
}

C++: #include <stdio.h> 
 
 int main(void){ 
 int a;
 int b;
 int c; 
 int wwwwww;
 int i;
 int n;
      
 scanf("%d", &n); 
 for(i = 0; i < n; i++){ 
     scanf("%d %d %d", &a, &b, &c); 
     if(a > c){ 
      wwwwww = c;             
	  c = a; 
      a = wwwwww; 
    } 
     if(b > c){ 
       wwwwww = c; 
       c = b; 
       b = wwwwww; 
     } 
     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 n;
  while(cin >> n) {
    for (int i = 0; i < n; ++i) {
      int x, y, z;
      cin >> x >> y >> z;
      if (x < y + z && y < z + x && z < x + y) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
  return 0;
}

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

inline int square(int x) {
    return x * x;
}

bool is_right_triangle(vector<int> &sides)
{
    sort(sides.begin(), sides.end());
    return square(sides[0]) + square(sides[1]) == square(sides[2]);
}

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

    for (vector<int> sides(3); length > 0 && cin >> sides[0] >> sides[1] >> sides[2]; length--)
        cout << (is_right_triangle(sides) ? "YES" : "NO") << endl;

    return 0;
}

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

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

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

int main() {

    int N = 3;
    int hen[3];
    
    cout << N;
    
 
        cin >> hen[0] >> hen[1] >> hen[2];
    
    
    sort(hen, hen + 3);
    
  
    
    if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) {
        cout << "YES";
       else cout << "NO";
        
    }

    return 0;
}

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

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

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

int main(){

	int a,b,c;
	cin >> a >> b >> c;

	if((a+b)<=c) cout << "No" << endl;
	else if((a+c)<=b) cout << "No" << endl;
	else if((b+c)<=a) cout << "No" << endl;
	else cout << "Yes" << endl;

    return 0;
}

C++: #include <stdio.h>

int main(void) {
  int n;
  int i;
  
  scanf("%d", &n);

  for(i=0; i<n; i++) {
    int max, b, c;
    
    scanf("%d %d %d", &max, &b, &c);

    if (max < b) {
      int tmp = max;
      max = b;
      b = tmp;
    }
    if (max < c) {
      int tmp = max;
      max = c;
      c = tmp;
    }

    if (max * max == b*b + c*c) {
      puts("YES");
    } else {
      puts("NO");
    }
  }

  return 0;
}

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

int main() {

    int N;
    cin >> N;
 
    int hen[3];
    while (N --> 0) {
        cin >> hen[0] >> hen[1] >> hen[2];
        sort(hen, hen + 3);
        
        if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) {
            cout << "YES";
        } else {
            cout << "NO";
        }
    }
    

    return 0;
}