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<algorithm>
#include<queue>
#define YES 1
#define NO 0
using namespace std;

int main(){
	int num, a, b, c, temp;
	queue<int> ans;
	
	cin >>num;
	
	for(int i = 0; i < num; i++){
		cin >>a >>b >>c;
		
		if(a > b){
			if(a > c);
			if(c > a) swap(a, c);
		} else{
			if(b > c) swap(a, b);
			if(c > b) swap(a, c);
		}
		
		if((a * a) == (b * b) + (c * c)) ans.push(YES);
		else ans.push(NO);
	}
	
	for(int i = 0; i < num; i++){
		temp = ans.front();
		if(temp == YES) cout <<"YES"<<endl;
		else cout <<"NO"<<endl;
		ans.pop();
	}
	
	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 <iostream>
#include <algorithm>
#include <string>
#include <cmath>
using namespace std;

int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		int a,b,c;
		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>

int main()
{
	int N, a, b, c;

	std::cin >> N;
	for (int i = 0; i < N; ++i)
	{
		std::cin >> a >> b >> c;
		a *= a;
		b *= b;
		c *= c;
		if (a == b + c || b == c + a || c == a + b)
			std::cout << "YES" << std::endl;
		else
			std::cout << "NO" << std::endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <array>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <utility>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <bitset>
#include <random>
#include <functional>
#include <sstream>
#include <iomanip>

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back

typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef long long LL;

int main() {
	int n;
	cin >> n;
	rep(i, n) {
		VI a(3);
		rep(j, 3)cin >> a[j];
		SORT(a);
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])puts("YES");
		else puts("NO");
	}
}

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

using namespace std;

int main() {

	int a, b, c,d,no;
	int result[1000];

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

		d = a;
		if (d < b)
			d = b;
		if (d < c)
			d = c;

		if (d == a) {
			if (a*a == b*b + c*c)
					result[i] = 1;
			else result[i]= 0;
			}
		else if (d == b) {
			if (b*b == a*a + c*c)
				result[i] = 1;
			else result[i] = 0;
		}
		else {
			if (c*c == a*a + b*b)
				result[i] = 1;
			else result[i] = 0;
		}
	}


	for (int i = 0; i < no; i++) {
		if (result[i] == 1)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;

}

C++: #include <iostream>

using namespace std;

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

	getchar();
	getchar();
	return  0;
}

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

int l[3][3];

void swap(int a, int b, int c){
	int buf = l[c][a];
	l[c][a] = l[c][b];
	l[c][b] = buf;
}

//bubble
void sort(int c){
	for(int i = 0; i < 2; i++){
		for(int j = i; j < 2; j++){
			if(l[c][j] > l[c][j+1]) swap(j,j+1,c);	
		}
	}
}

int main(){
int buf;

cin >> buf;

for(int i = 0; i < buf; i++){	
	cin >> l[i][0] >> l[i][1] >> l[i][2];
	sort(i);
}

for(int j = 0; j < buf; j++){
	if(l[j][2]*l[j][2] == l[j][0]*l[j][0] +l[j][1]*l[j][1]){
		cout << "YES" << endl;
	}else{
		cout << "NO" << endl;
	}
}

return 0;
}

C++: #include <iostream>

void checkTringle(int a,int b,int c){
    if(a * a == b * b + c * c){
        std::cout << "YES" << std::endl;
    }else{
        std::cout << "NO" << std::endl;
    }
}

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

    int side[3];

    for(int i=0; i<dataSize; i++){
        for(int a=0; a<3;a++){
            std::cin >> side[a];
        }

        for(int b = 0; b< 3; b++){
            for(int j=i+1; j<3;j++){
                if(side[i] > side[j]){
                    int tmp = side[i];
                    side[i] = side[j];
                    side[j] = tmp;
                }
            }
        }

        checkTringle(side[2],side[1],side[0]);
    }
}

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

int main()
{
  int cases; cin >> cases;
  while(cases--) {
    int a, b, c; 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++: #include <iostream>


using namespace std;
 
int main()
{

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

	d = c * c;

	if ( d == ( 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;

  while(n--)
    {
      cin >> 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;
	}
    }
}

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

int main(){

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

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

	int stop;
	cin >> stop;

    return 0;
}