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 <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	vector<bool> arr;
	for(int i=0;i<n;i++)
	{
		vector<int> cnt;
		int a,b,c;
		cin>>a>>b>>c;
		cnt.push_back(a);
		cnt.push_back(b);
		cnt.push_back(c);
		sort(cnt.begin(),cnt.end());
		if(sqrt(cnt[0]*cnt[0] + cnt[1]*cnt[1]) == cnt[2])
			arr.push_back(true);
		else
			arr.push_back(false);
	}
	for(int i=0;i<arr.size();i++)
	{
		if(arr[i] == true)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int N, s1, s2, s3;

	while(cin >> N)
	{
		while(N--)
		{
			cin >> s1 >> s2 >> s3;
			if(s1*s1 + s2*s2 == s3*s3 || s1*s1 + s3*s3 == s2*s2 || s3*s3 + s2*s2 == s1*s1)
				cout << "YES\n";
			else
				cout << "NO\n";
		}
	}
	return 0;
}

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

int main(){
	int n,a,b,c;
	cin>>n;
	while(n--){
		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;
		}
	}
	return 0;
}

C++: // aoj-0003.cpp

#include <cstdio>

int main() {
	int i, j;
	int sets, x, y, z;

	// read numbers of data sets
	scanf("%d", &sets);
	
	// read data set
	for (i=0; i<sets; ++i) {
		scanf("%d %d %d", &x, &y, &z);
		if (((x * x) + (y * y)) == (z * z)) {
			puts("YES");
		} else {
			puts("No");
		}
	}
	
	return 0;
}

C++: #include<stdio.h>

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

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;
}