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

using namespace std;

bool valid(int a, int b, int c) {
  int a2 = a*a, b2 = b*b, c2 = c*c;
  return (a2+b2==c2) || (b2+c2==a2) || (c2+a2==b2);
}

int main() {
  int N;
  scanf("%d", &N);
  for (int i=0;i<N;i++) {
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    if (valid(a, b, c)) puts("YES");
    else puts("NO");
  }
  return 0;
}

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

int main() {
  int a,b,c;
  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 <algorithm>
#include <iostream>
using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;
    cin >> n;

    int edges[3];
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < 3; j++) cin >> edges[j];
        sort(edges, edges + 3);
        cout << (edges[0] * edges[0] + edges[1] * edges[1] ==
                         edges[2] * edges[2]
                     ? "YES"
                     : "NO")
             << endl;
    }

    return EXIT_SUCCESS;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
#include <climits>
#include <cmath>
#include <cfloat>

#define FOR(i,b,n) for(int i=b;i<n;i++)
#define CLR(mat) memset(mat, 0, sizeof(mat))
#define INF 1<<25

using namespace std;

int edg[3], n;

int main()
{
	cin >> n;

	FOR(i, 0, n)
	{
		int flg = 0;

		FOR(j, 0, 3)
		{
			cin >> edg[j];
		}

		FOR(j, 0, 3)
		{
			if( edg[0]*edg[0] == edg[1]*edg[1] + edg[2]*edg[2] )
			{
				cout << "YES" << endl;
				flg = 1;
				break;
			}

			int tmp = edg[0];
			edg[0] = edg[1];
			edg[1] = edg[2];
			edg[2] = tmp;

		}

		if(!flg)
			cout << "NO" << endl;

	}

	return 0;

}

C++: #include <iostream>
#include <cstdio>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;
    char* Result[NMAX];

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        
        if( (( (a^2) + (b^2) ) == (c^2)) || (( (b^2) + (c^2) ) == (a^2)) || (( (c^2) + (b^2) ) == (a^2))){
            Result[Ncount] = "Yes";
        }else{
            Result[Ncount] = "NO";
        }
    }
    
    //??????????????????????????¨???Yes or No?????????
    for(int Ncount=0;Ncount < N;Ncount++){
        printf("%s\n",Result[Ncount]);
    }
    
}

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

bool solve() {
	int edges[3];
	for(auto &e : edges) cin >> e;
	sort(edges, edges + 3);
	return edges[0] * edges[0] + edges[1] * edges[1] == edges[2] * edges[2];
}

int main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int t;
	cin >> t;
	while(t--) cout << (solve() ? "YES" : "NO") << endl;

	return EXIT_SUCCESS;
}

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

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


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

C++: #include<iostream>
using namespace std;
int main() {
	int x,y,n, i, j,a[10000],b[10000],c[10000];
	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		x = a[i] * a[i] + b[i] * b[i];
		y = c[i] * c[i];
		if (x == y) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	
	
	return 0;
}

C++: #include<cstdio>
#include<cstring>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int n,date[3],i;
	scanf("%d",&n);
	for(i=0;i<n;i++) {
		scanf("%d %d %d",&date[0],&date[1],&date[2]);
		sort(date,date+3);
		if(date[2]*date[2]==(date[0]*date[0])+(date[1]*date[1])) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

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

int main(){
	int length;
	std::cin >> length;
	for (int i = 0; i < length; i++)
	{
		std::vector<int> side;
		for (int j = 0; j < 3; j++)
		{
			int scan_num;
			std::cin >> scan_num;
			side.push_back(scan_num);
		}
		std::sort(side.begin(), side.end());
		if (side[0] * side[0] + side[1] * side[1] == side[2] * side[2])
			std::cout << "YES\n";
		else
			std::cout << "NO\n";
	}
	return 0;

}

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

  if(a>c){
    tmp=a;
    a=c;
    c=tmp;
  }
  if(b>c){
    tmp=b;
    b=c;
    c=tmp;
  }

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

C++: #include <stdio.h>

int try(int a, int b, int c){
	if(a*a+b*b==c*c){
		return 1;
	}
	return 0;
}

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

C++: include <iostream>
#include <math.h>

using namespace std;

bool judge_triangle(double a,double b,double c){
	double d=sqrt(pow(a)+pow(b));
	if(d==c) return true;
	else return false;
}

int main(void){
	int i,count;

	cin>>count;

	for(i=0;i<count<i++){
		cin>>a>>b>>c;
		if(judge_triangle(a,b,c)) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

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

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

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

int main(){
	int n,a,b,c;
	
	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);
		
		if(a[0]==3 && a[1]==4 && a[2]==5)puts("YES");
		else puts("NO");
	}
}