Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	}
	return "NO"
}

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

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

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

int judge(double a,double b,double c){
  int j=0;
  if(a*a==b*b+c*c) j=1;
 else if(b*b==a*a+c*c) j=1;
 else if(c*c==a*a+b*b) j=1;
return j;
}



int main(void){
  int n;
  
  scanf("%d",&n);

  int tri[100000][3];
  
  int i=0;
  for(i;i<n;i++){
      scanf("%d %d %d",&tri[i][0],&tri[i][1],&tri[i][2]);
	}
  i=0;
  for(i;i<n;i++){
    int j=0;
    j=judge(tri[i][0],tri[i][1],tri[i][2]);
    
    if(j==1)
      printf("YES\n");
    else
      printf("NO\n");
  }
}

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

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

scans(" %d",&n);

for(int i=0;i<n;i++){
scanf(" %d %d %d",&a,&b,&c);
if(a*a==b*b+c*c||c*c==b*b+a*a||b*b=a*a+c*c){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}

return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
    int n,x,y,z;
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> x >> y >> z;
        int X,Y,Z;
        X = x*x;
        Y = y*y;
        Z = z*z;
        if(X+Y==Z || Y+Z==X || X+Z==Y){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include <stdio.h>

int judge_right_triangle(int a, int b, int c);

int main(void)
{
    int number;
    scanf("%d", &number);
    for(int j = 0; j < number; j = j + 1){
      int print_right_triangle;
      int x, y, z;
      scanf("%d %d %d", &x, &y, &z);
      print_right_triangle = judge_right_triangle(x, y, z);
      if (print_right_triangle == 1) {
        printf("YES\n");
      } else if (print_right_triangle == 0) {
          printf("NO\n");
        }
    }
  return 0;
}

int judge_right_triangle(int a, int b, int c)
{
    int t;
    if (a * a + b * b == c * c){
      t = 1;
    } else if (a * a + c * c == b * b) {
      t = 1;
    } else if ( b * b + c * c == a * a) {
      t = 1;
    }
  //三平方の定理を満たすときt=１を返す                                                                                                                                               
    else{
      t = 0;
    }
    return t;
}

C++: #include <iostream>

using namespace std;

int main(){

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

	while(cin>>a>>b>>c){
		if(a*a == b*b+c*c || b*b == a*a+c*c || c*c == b*b+a*a )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;
    int tmp;
    if(a < b){
      tmp = a;
      a = b;
      b = tmp;
    }
    if(a < c){
      tmp = a;
      a = c;
      c = tmp;
    }
    (a * a == b * b + c * c) ? cout << "YES" << endl : cout << "NO" << endl;
  }
}

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

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

int main() {
    string str;
    int n;
    cin >> n;
    vector<int> vx, vy, vz;
    for(int i = 0; i < n; i++) {
        int x, y, z;
        cin >> x >> y >> z;
        vx.push_back(x);
        vy.push_back(y);
        vz.push_back(z);
    }
    
    for(int i = 0; i < n; i++) {
        vector<int> v;
        v.push_back(vx[i]);
        v.push_back(vy[i]);
        v.push_back(vz[i]);

        sort(v.begin(), v.end());
        if(pow(v[2],2.0) == pow(v[0],2.0) + pow(v[1],2.0)){
            str = "Yes";
        } else {
            str = "No";
        }
        cout << str << endl;
    }  
}

C++: #include <cstdio>

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

C++: #include <cstdio>

#define MAX(a, b)((a) < (b) ? (b) : (a))

using namespace std;

int pow32(int base, int exp)
{
    int ret = 1;
    
    while (exp) {
        if ((exp & 1) == 1) ret *= base;
        
        exp >>= 1;
        base *= base;
    }
    
    return ret;
}

void YES()
{
    printf("YES\n");
}

void NO()
{
    printf("NO\n");
}
 
int main() {
	int N;
	int a, b, c;
	int longest;

	scanf("%d", &N);
	
	while (N--) {
	    scanf("%d %d %d", &a, &b, &c);
	    
	    longest = MAX(a, MAX(b, c));
	    
	    if (longest == a) {
	        if (pow32(a, 2) == (pow32(b, 2) + pow32(c, 2))) YES();
	        else NO();
	    } else if (longest == b) {
	        if (pow32(b, 2) == (pow32(a, 2) + pow32(c, 2))) YES();
	        else NO();
	    } else if (longest == c) {
	        if (pow32(c, 2) == (pow32(a, 2) + pow32(b, 2))) YES();
	        else NO();
	    }
	}
	
	return 0;
}

C++: #include <stdio.h>

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

    scanf("%d%d%d",&a,&b,&c);

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

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

    return 0;
}

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

bool check(const int* array);
int main(void) {
    int length[3];
    
    while(cin >> length[0] >> length[1] >> length[2]) {
        sort(length, length + 3);
        if(check(length)) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

bool check(const int* array) {
    if(array[0] * array[0] + array[1] * array[1] == array[2] * array[2]) {
        return true;
    } else {
        return false;
    }
}

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

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

int main(){
  int n,tri[3];

  cin >> n;

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

  return 0;
}

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