Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

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

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

bool judgeRectTriangle(int , int , int);

int main(void)
{
    int edge1, edge2, edge3;

    while (scanf("%d%d%d", &edge1, &edge2, &edge3) != EOF) {
        if (judgeRectTriangle(edge1, edge2, edge3) ){
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    
    return 0;
}

bool judgeRectTriangle(int x, int y, int z)
{
    if (x * x + y * y == z * z || y * y + z * z == x * x || z * z + x * x == y * y) {
        return true;
    } else {
    return false;
    }
}

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

int main(){
	for (int x = 0; x < 82;)
	{
		int a = 0;
		int b = 0;
		int c = 0;
		int d = a*a;
		int e = b*b;
		int f = c*c;
		cin >> a >> b >> c;
		if (d + e == f)
		{
			cout << "YES" << endl;
		}
		else if (d + f == e)
		{
			cout << "YES" << endl;
		}
		else if (e + f == d)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}



	}
	
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int n,a[3];
	int t=90000;
	for(int i=t;i;i--){
		for(int j=i;j;j--){
			if(i+j==2)cin>>n;
		}
	}
	while(n--){
		for(int i=0;i<3;i++)cin>>a[i];
		sort(a,a+3);
		cout<<(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]?"YES":"NO")<<endl;
	}
	return 0;
}

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

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

C++: #include<iostream>
#include<cstdio>
#include<stdio.h>
#include<string>
using namespace std;
int main() {
	long judge[1000],i,n,a[1000],b[1000],c[1000];

	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i]*a[i] + b[i]*b[i] == c[i]*c[i] || a[i]*a[i]+c[i]+c[i]==b[i]*b[i]||b[i]*b[i]+c[i]*c[i]==a[i]*a[i]) {
			judge[i] = true;
			
		}
		else {
			judge[i] = false;
			
		}

	}
	for (i = 0; i < n; i++) {
		if (judge[i]==true) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	
	

	return 0;
}

C++: #include<iostream>
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*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;
	}
    return 0;
}

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

int main()
{
    int set;
    int num[3];
    int a,b,c;
    
    if(set < 1000)
        cin >> set;
        
    for(int i = 0; i < set; i++){
        for(int j =0; j < 3; j++){
            cin >> num[j];
        }
        sort(num, num+3);
        a = num[0];
        b = num[1];
        c = num[2];
        if(a % 3 == 0 && b % 4 == 0 && c % 5 == 0){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include <stdio.h>
  
int triJudgefunc(int x, int y, int z);
  
int main(void)
{
    int row;
    scanf("%d", &row);
    for (int i = 0; i < row; ++i) {
        int firstn, secondn ,thirdn; 
        scanf("%d %d %d", &firstn, &secondn, &thirdn);
        if (triJudgefunc(firstn, secondn, thirdn) = true) {
        printf("YES\n");
        } else {
        printf("NO\n");
        }
    }
    return 0;
}
  
  
  
int triJudgefunc(int x, int y, int z)
{
    int maxlength, notmax1, notmax2;
    if (x > y) {    //x > y
        if (x > z) {
            maxlength = x, notmax1 = y, notmax2 = z;    //x???max
        } else {
            notmax1 = x, notmax2 = y, maxlength = z;    //z???max
        }
    } else {    //y > x
        if (y > z) {
            notmax1 = x, maxlength = y, notmax2 = z;    //y???max
        } else {
            notmax1 = x, notmax2 = y, maxlength = z;    //z???max
        }
    }
    double result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2;
    return result;
}

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)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
    int a[3],b,n,i,x,y;
	scanf("%d",&b);
    for(n=0;n<b;n++){
		for(i=0;i<3;i++){
		scanf("%d",&a[i]);
		}
		for(i=0;i<2;i++){
		    for(x=i+1;x<3;x++){
			    if(a[i]<a[x]){
				    y=a[i];
					a[i]=a[x];
					a[x]=y;
				}
			}
		}
		for(i=0;i<3;i++){
			a[i]=a[i]*a[i];
        }
	//	printf("%d\n",x);
		if(a[0]==a[1]+a[2]){
		    printf("YES\n");
		}
		else{
		    printf("NO\n");
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
bool CheckT(int a,int b,int c);

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

	}
	return 0;
}

bool CheckT(int a,int b,int c){
	a*=a;
	b*=b;
	c*=c;
	if(a+b==c||b+c==a||a+c==b)return true;
	else return false;
}

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

int main(){
    int n;
    cin >> n;
    int a,b,c;
    while(cin >> a >> b >> c){
        //cout << a << b << c << endl;
        if(pow(a,2.0)==pow(b,2.0)*pow(c,2.0)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

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

int main() {
  int sides[3];
  int num;

  cin >> num;
  int sumSidesSq=0;
  for(int i=0; i<num; i++) {
    int maxIndex=0, maxValue=0;
    for(int j=0; j<3; j++) {
      cin >> sides[j];
      if(sides[j] > maxValue) {
        maxValue = sides[j];
        maxIndex = j;
      }
    }

    sumSidesSq = 0;
    for(int j=0; j<3; j++) {
      if(j == maxIndex)
        sumSidesSq -= sides[j]*sides[j];
      else
        sumSidesSq += sides[j]*sides[j];
    }
    cout << ( (sumSidesSq == 0) ? "YES" : "NO" ) << endl;
  }
  return 0;
}

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

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

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

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

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