Go: package main

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

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		cols := sort.StringSlice(strings.Split(sc.Text(), " "))
		cols.Sort()
		for i, c := range cols {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main()

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

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

C++: import java.util.*;
public class Main {
	public static void main(String[] args){
	 
	Scanner sc= new Scanner (System.in);
	int n = sc.nextInt();
	int i[];
	i = new int[3];
for(int a=0;a<=n;a++){	
		for(int d=0;d<3;d++ ){
			i[d]=sc.nextInt();
			Arrays.sort(i);
			if((i[2]*i[2])==(i[0]*i[0])+(i[1]*i[1])){
				System.out.println("Yes");
			}
			else System.out.println("No");	
			}	
		}
	
		
	 
	
	}

}

C++: #include <iostream>


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

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

C++: #include <iostream>
using namespace std;
int main()
{
	int a[100],b[100],c[100];
	int x=0;
	int n;

	while(true){
		cin >> n;

		if(n==0)
			break;
		for(int i=0 ;i<n ;i++){

     		cin >> a[i] >> b[i] >> c[i];

	    	if(a[i]<b[i]){
		    	x=a[i];
			    a[i]=b[i];
		    	b[i]=x;
		    }
		    if(b[i]<c[i]){
		    	x=b[i];
	     		b[i]=c[i];
		    	c[i]=x;
		    }
		    if(a[i]<b[i]){
		    	x=a[i];
			    a[i]=b[i];
			    b[i]=x;
	    	}
		}
		for(int i=0 ;i<n ;i++){
		    a[i] = a[i]*a[i];
		    b[i] = b[i]*b[i];
		    c[i] = c[i]*c[i];

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

C++: #include <iostream>
using namespace std;
bool judge(int a, int b, int c){
  if( a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)return true;
  return false;
}

int main(){
  int a, b, c;
  int n;
  cin >> n;
  for(int i = 0 ; i < n ; i++){
    cin >> a >> b >> c;
    cout << (judge(a,b,c)?"YES":"NO") << endl;
  }
  return 0;
}

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

int main(void){
	int n;
	cin >> n;
	for(int i=0;i<n;i++){
		int in[3] = {0};
		for(int j=0;j<3;j++){
			cin >> in[j];
		}
		for(int j=0;j<3;j++){//Sort
			for(int k=j+1;k<3;k++){
				if(in[j]<in[k]){
					int tmp = in[j];
					in[j] = in[k];
					in[k] = tmp;
				}
			}
		}
		cout << ((in[0]*in[0]==in[1]*in[1]+in[2]*in[2])?"YES\n":"NO\n");
	}
	return 0;
}

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

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

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

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

int main()
{
    int a,b,c,n;
    scanf("%d",&n);
    while(n--)
    {
        scanf("%d%d%d",&a,&b,&c);
        if(c*c==a*a+b*b)
            printf("Yes\n");
        else printf("No\n");
    }
    return 0;
}

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

C++: #include <iostream>

using namespace std;

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

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

int main(){
	int N;
	cin>>N;
	int ** kazu=new int*[N];
	for(int i=0;i<N;i++)
		kazu[i]=new int[3];
	int *saidai=new int[N];
	bool *hantei=new bool[N];
	fill(hantei,hantei+N,false);

	for(int j=0;j<N;j++){
		cin>>kazu[j][0]>>kazu[j][1]>>kazu[j][2];
		if(kazu[j][0]<kazu[j][1]){
			swap(kazu[j][0],kazu[j][1]);
			if(kazu[j][0]<kazu[j][2])
				swap(kazu[j][0],kazu[j][2]);
		}
		else if(kazu[j][0]<kazu[j][2]){
			swap(kazu[j][0],kazu[j][2]);
			if(kazu[j][0]<kazu[j][1])
				swap(kazu[j][0],kazu[j][1]);
		}
		
		if((kazu[j][0]*kazu[j][0])==(kazu[j][1]*kazu[j][1]+kazu[j][2]*kazu[j][2]))
			hantei[j]=true;
	}
	for(int k=0;k<N;k++)
		cout<<((hantei[k])?"YES":"NO")<<endl;

	return 0;
}

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

int main() {
	int n = 0, a = 0, b = 0, c = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		std::cin >> a >> b >> c;
		if (c < a) swap(c, a); // a <= c && b <= c ?????????
		if (c < b) swap(c, b);
		if (a*a + b*b == c*c) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << 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==nIn[2])
		{
			swap(nIn[2],nIn[0]);
		}
		else if (nMax==nIn[1])
		{
			swap(nIn[1],nIn[2]);
		}
		if(nIn[0]*nIn[0]==nIn[1]*nIn[1]+nIn[2]*nIn[2])
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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

int main()
{
	int n;cin>>n;
	for(int i=0;i<n;i++)
	{
		double a,b,c;
		cin>>a>>b>>c;
		if(pow(a,2)+pow(b,2)==pow(c,2))
		{
			cout<<"YES"<<endl;
			continue;
		}
		if(pow(a,2)+pow(c,2)==pow(b,2))
		{
			cout<<"YES"<<endl;
			continue;
		}
		if(pow(b,2)+pow(c,2)==pow(a,2))
		{
			cout<<"YES"<<endl;
			continue;
		}
		cout<<"NO"<<endl;
	}
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#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 (b*b == c * c + a * a)
		{
			cout<<"YES"<<endl;
		}
		else if (c*c == a * a + b * b)
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return false;
}