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 <stdio.h>
#include <stdbool.h>
void Judgetriangle(int a, int b, int c);
void judge(int a, int b, int c);
int a, b, c;
bool flag = false;
int main(void)
{
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i)
        {
            flag = false;
            scanf("%d %d %d", &a, &b, &c);
            Judgetriangle(a, b, c);
        }
    return 0;
}

void Judgetriangle(int a, int b, int c)
{
    judge (a, b, c);
    judge (a, c, b);
    judge (b, c, a);
    if (flag == true) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

void judge(int a, int b, int c)
{
    if (a*a + b*b == c*c) {
        flag = true;
    }
}

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<iostream>

using namespace std;

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


	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<string>
#include<sstream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cctype>
#include<climits>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
#define P pair<int, int>
const int INF = INT_MAX / 2;

int main(){
    int n;
    cin >>n;
    REP(i, n){
        int a, b, c;
        cin >>a >>b >>c;
        bool ans = false;

        if(a * a + b * b == c * c) ans = true;
        if(a * a + c * c == b * b) ans = true;
        if(b * b + c * c == a * a) ans = true;

        if(ans) cout <<"YES" <<endl;
        else cout <<"NO" <<endl;
    }

    return 0;
}

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

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <set>

using namespace std;

#define ALL(co) co.begin(), co.end()

typedef long long LL;
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> Array;
typedef vector<int> LArray;

void readAll(Array& vec, int n) { for (int i = 0; i < n; i++) cin >> vec[i]; }

int m, n;


int main(void)
{
	while(cin >> n && n)
	{
		for (int i = 0; i < n; i++)
		{
			Array arr(3);
			readAll(arr, n);
			sort(ALL(arr));
			cout << (arr[2] * arr[2] == arr[0] * arr[0] + arr[1] * arr[1] ? "YES" : "NO") << endl;
		}
		return 0;
	}
	return 0;
}

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

using namespace std;

bool isRightTriangle(int a, int b, int c)
{
	return (a * a == b * b + c * c);
}

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

	for (int i = 0; i < n; i++){
		vector<int> triangle;
		for (int j = 0; j < 3; j++){
			int edge;
			scanf("%d", &edge);
			triangle.push_back(edge);
		}
		sort(triangle.begin(), triangle.end());
		puts(isRightTriangle(triangle[2], triangle[1], triangle[0]) ? "YES" : "NO");
	}
	return (0);
}

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

int main() {
  int n,a,b,c;
  std::cin >> n;
  for(int i=0;i<n;i++) {
    scanf("%d %d %d", &a, &b, &c); 
    std::vector<int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    sort(v.begin(),v.end());
    if((a*a)+(b*b)==(c*c)) {
      std::cout << "YES" << std::endl;
    }
    else {
      std::cout << "NO" << std::endl;
    }
  }
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(pow(a,2)); V.push_back(pow(b, 2)); V.push_back(pow(c, 2));
        std::sort(V.begin(), V.end());
        if (v[2] == v[1] + v[0]) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}

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

int main()
{
	vector <int> v_c;
	v_c.resize(3);
	double e =2.0;
	int N;
	//data set
	cin >> N;
	for(int i = 0; i < N; ++i)
	{
		cin >> v_c[0] >> v_c[1] >> v_c[2];
		sort(v_c.begin(),v_c.end(),greater<int>());
		if( pow(v_c[0],e) == (pow(v_c[1],e)+pow(v_c[2],e)))
		{
			cout << "YES"<<endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string> 
#include <sstream>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <list>
#include <cstring>
#include <stack>
   
using namespace std;

bool solve(int a, int b, int c)
{
    return (a * a + b * b == c * c);
}

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