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

#define MAX 3

using namespace std;

int main() {
	int list[MAX], n;

	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> list[0] >> list[1] >> list[2];
		for (int j = 0; j < MAX; j++) {
			list[j] *= list[j];
		}

		bool judge = false;
		for (int j = 0; j < MAX; j++) {
			if (list[j] == list[(j+1)%3] + list[(j+2)%3]) {
				judge = true;
				break;
			}
		}

		if (judge) {
			cout << "YES";
		}
		else {
			cout << "NO";
		}

		cout << endl;
	}

	return 0;
}

C++: #include <stdio.h>
#include <math.h >
int main(void) {
	int a, b, c, t, x, y;
	t = a ; x = b ; y = c; 
	if(t<=b){
		t = b ; x = c ; y = a ;
	}
	if(t<=c){
		t = c ; x = a ; y = b;
		
	}
	if(t==sqrt(pow(x)+pow(y))){
	printf("YES");
	}
	else{
		printf("NO");
	}
	return 0;
}

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

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

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

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

using namespace std;

//??´?§?????§???¢????????¢??°Right_Triangle
bool Right_Triangle(int data[]){
    //????????§?????????????????????
    sort(data, data+3, greater<int>());
    if(data[0]*data[0] == data[1]*data[1] + data[2]*data[2]){
        return true;
    }
    else return false;
}

int main (){
    int i = 0;
    //????????????????????°n
    int n = 0;
    //????????????????????? data
    int data[3];

    cin >> n;

    //??´?§?????§???¢?????????????´??????? ans
    bool ans[n];

    //??\?????????Right_Triangle??????????????????????????£??¨???
    for(i = 0; i < n; i++){
        cin >> data[0] >> data[1] >> data[2];
        if(Right_Triangle(data)) ans[i] = true;
        else ans[i] = false;

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

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>


using namespace std;

string tri(int a, int b, int c){
	if(a + b > c && b + c > a && c + a > b)return "YES";
	return "NO";
}

int main(void) {
	int len, a, b, c;
	cin >> len;
	for(int i = 0; i < len; i++){
		cin >> a >> b >> c;
		cout << tri(a, b, c) << endl;
	}
}

C++: #include<stdio.h>
 
int main(void){
  int n;
  int s1,s2,s3;
  int temp;
  
    scanf("%d",&n);

  for(int i = 0;i < n;i++){
    scanf("%d %d %d",&s1,&s2,&s3);
    if(s1 < s2){
      temp = s1;
      s1 = s2;
      s2 = temp;
    }
    if(s1 < s3){
      temp = s1;
      s1 = s3;
      s3 = temp;
    }
    if(s1 * s1 == s2 *s2 + s3 * s3){
      printf("YES\n");
    }else{
      printf("NO\n");
    }
  }

  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,i,w,a,s,d,x,j,z;
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d %d %d",&a,&s,&d);
			if(a>s&&d<a){
				w=(d*d)+(s*s);
				x=a*a;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}	
			}	
			if(a<d&&d>s){
				w=(a*a)+(s*s);
				x=d*d;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			if(a<s&&s>d){
				w=(d*d)+(s*s);
				x=s*s;
					if(w==x){
						printf("YES\n");
					}
					else{
						printf("NO\n");
					}				
			}
			if(a==s&&s==d&&d==a){
				printf("NO\n");
			}	
		
		}
	return 0;
}

C++: #include <iostream>

int main ()
{
    int N, x, y, z, X, Y, Z;
    std::cin >> N;
    for (int n = N; n > 0; --n) {
        std::cin >> x >> y >> z;
        X = x * x;
        Y = y * y;
        Z = z * z;
        if (X + Y == Z || Y + Z == X || Z + X == Y) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

C++: #include <iostream>

inline bool is_right_triangle(u_int a, u_int b, u_int c) {
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b) ? true : false;
}

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

    std::cin >> n;
    while (std::cin >> a >> b >> c) {
        if (is_right_triangle(a, b, c)) {
            std::cout << "Yes" << std::endl;
        } else {
            std::cout << "No" << std::endl;
        }
    }

    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
using namespace std;
int main() {
	int a;
	cin >> a;
	for (int b = 0; b < a; b++) {
		int c[3];
		cin >> c[0] >> c[1] >> c[2];
		sort(c, c + 3);
		if (c[0] * c[0] + c[1] * c[1] == c[2] * c[2])puts("YES");
		else puts("NO");
	}
}

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

int main()
{
int a,b,c,x,y,z;
while(cin>>a>>b>>c)
{
x=a*a;
y=b*b;
z=c*c;
if(a+b==c||b+c==a||c+a==b)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
return 0;
}

C++: #include <stdio.h>

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

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

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

    return (0);
}

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

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

C++: #include <iostream>
#include <stdlib.h>
#include "string"
#include <math.h>

using namespace std;


int main(){
    int a,b,c;
    int N;
    string *str;
    
    cin >> N;
    
    str=(string *)malloc(sizeof(string)*N);
    
    for(int i=0;i<N;i++){
        cin>>a>>b>>c;
        if(c==sqrt((pow((double)a,(double)2)+pow((double)b,(double)2)))) str[i]="YES";
        else str[i]="NO";
    }
    
    for(int i=0;i<N;i++) cout<<str[i]<<endl;
    
    free(str);
    
    return 0;
}