Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func square(x int) int {
	return x * x
}

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

C++: main(a,b,c){for(;~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&c+b-a)?"NO":"YES"))a*=a,b*=b,c*=c;}

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

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

	cin >> n;

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

		int max=a, k=b, l=c;
		if(max < b){
			max = b;
			k=a;
		}else if(max < c){
			max = c;
			l=a;
		}

		if(max*max == k*k + l*l)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(){int n,l,s;scanf("%d",&n);while(n--){int i[3];scanf("%d %d %d",&i[0],&i[1],&i[2]);l=2;while(l--){if(i[l+1]>i[l]){s=i[l+1];i[l+1]=i[l];i[l]=s;}}printf("%s\n",i[2]*i[2]+i[1]*i[1]==i[0]*i[0]?"YES":"NO");}return 0;}

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

int main()
{
	int x;
	int a[3];

	cin >> x;

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

C++: #include <iostream>
using namespace std;
string isRightTriangle(int s1, int s2, int s3) {
  int a = s1, b = s2, c = s3;
  for(int i = 0; i < 3; ++i) {
	if(a*a + b*b == c*c) {
	  return "YES";
	}
	if(i == 0) swap(a, b);
	if(i == 1) swap(b, c);
  }
  return "NO";
}
int main() {
  int N, s1, s2, s3;
  cin >> N;
  for(int i = 0; i < N; ++i) {
	cin >> s1 >> s2 >> s3;
	cout << isRightTriangle(s1, s2, s3) << endl;
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main (void){
	int i;
	double a,b,c;

	cin>>i;
	while(i){
		cin>>a>>b>>c;

		if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
		i--;
		
	}
}

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

using namespace std;

int main(){

	int i, m;
	cin >> m;

	for(i=0; i<m; i++){

	int a[3];

	cin >> a[0] >> a[1] >> a[2];
	sort(a, a+3);

	if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1]){
		cout << "YES" << endl;
	}
	else{
		cout << "NO" << endl;
	}
}
}

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

int main(){
	int a, b, c;
	int d;
	int n;

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

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

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

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <math.h>
using namespace std;
int main(){
    double a[1010], n, s, k=0, i=0;
    cin >> n;
    for(i=0; i<n;i++){
             cin>>a[0]>>a[1]>>a[2];
             sort(a, a+3);
             k=(a[1]*a[1])+(a[0]*a[0]);
             if(a[2]==sqrt(k))
             printf("YES\n");
             else
             printf("NO\n");
    }
    return 0;
}

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

C++: #include "stdio.h"

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

	scanf("%d", &n);
	printf("\n");

	for (int i = 0; i < n; i++){
		scanf("%d %d %d", &a, &b, &c);

		a *= a;
		b *= b;
		c *= c;

		if(c == a+b || b == a+c || a == b+c) printf("YES\n");
		else printf("NO\n");
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a, b, c;
	int n;
	cin >> n;

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

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

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

int main(void){

  int n,i,a,b,c;
  cin >> n;
  for(i=0;i<n;i++){
    cin >> a >> b >> c;
    int num[3];
    num[0] = a;
    num[1] = b;
    num[2] = c;

    sort(num,num+3);

    if(num[2]*num[2] == num[0]*num[0] + num[1]*num[1])
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;

}

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

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

C++: n=int(input())
for i in range(n):
        a=[]
        a=input().split()
        a=sorted(a)
        if (int(a[0])**2)+(int(a[1])**2)==(int(a[2])**2):
            print('YES')
        else:
            print('NO')

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