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"
	} else {
		return "NO"
	}
}

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

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

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

long int l[3][3];

void swap(int a, int b, int c){
	int buf = l[c][a];
	l[c][a] = l[c][b];
	l[c][b] = buf;
}

//bubble
void sort(int c){
	for(int i = 0; i < 2; i++){
		for(int j = i; j < 2; j++){
			if(l[c][j] > l[c][j+1]) swap(j,j+1,c);	
		}
	}
}

int main(){
int buf;

cin >> buf;

for(int i = 0; i < buf; i++){	
	cin >> l[i][0] >> l[i][1] >> l[i][2];
	sort(i);
}

for(int j = 0; j < buf; j++){
	if(l[j][2]*l[j][2] == l[j][0]*l[j][0] +l[j][1]*l[j][1]){
		cout << "YES";
	}else{
		cout << "NO";
	}

	if(j != buf-1) cout << endl;
}

return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
	int a[3],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]) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	} 
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <set>

using namespace std;

#define ALL(co) co.begin(), co.end()

typedef long long LL;
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> Array;
typedef vector<int> LArray;

const int INF = 1 << 29;
const LL LINF = 1LL << 60;

int itiv;
inline int getInt() { return (cin >> itiv, itiv); }
void readAll(Array& vec, int n) { for (int i = 0; i < n; i++) cin >> vec[i]; }
inline bool between(int first, int last, int n) { return first <= n && n <= last; }
inline bool inRange(int begin, int end, int n) { return begin <= n && n < end; }
inline bool inRange(int size, int n) { return 0 <= n && n < size; }

int m, n;
int dx[] = { -1, 0, 1, 0 }, dy[] = { 0, -1, 0, 1 };
int dr[] = { 0, -1, 0, 1 }, dc[] = { -1, 0, 1, 0 };


int main(void)
{
	while(cin >> n && n)
	{
		for (int i = 0; i < n; i++)
		{
			vector<int> arr(3);
			readAll(arr, n);
			sort(ALL(arr));
			cout << (arr[2] * arr[2] == arr[0] * arr[0] + arr[1] * arr[1] ? "YES" : "NO") << endl;
		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int a,b,c,n,i;
int main(){
	cin>>n;
	for(i=0;i<n;i++){
	  cin>>a>>b>>c;
	  if(a>b){
		swap(a,b);
	  }
	  if(a>c){
	    swap(a,c);
	  }
	  if(b>c){
	    swap(b,c);
	  }
	  if(c*c==a*a+b*b){
		   cout<<"Yes"<<endl;
	  }
	  else{
		  cout<<"No"<<endl;
	  }
    }
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;

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

    scanf("%d", &n);
    while(n>0) {
        scanf("%d %d %d", &a[0], &a[1], &a[2]);
        sort(a, a+3);
        if(a[0]*a[0] + a[1]*a[1] == a[2] * a[2]) {
            printf("YES\n");
        }else{
            printf("NO\n");
        }
        n--;
    }
}

C++: #include <iostream>

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

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>
using namespace std;

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

	return 0;
}

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+b>=c && a+c>=b && b+c>=a)
        {
            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;

        }


    }

    return 0;
}

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

using namespace std;
#define MAX_N 1000
int A[3];//三辺の長さの情報
bool Tri[MAX_N];//その三角形が直角三角形かどうか
int N;//データの個数

int main(){
  scanf("%d",&N);
  for(int j = 0;j < N;j++){
    for(int i = 0;i < 3;i++){
      cin >>A[i];
    }
    sort(A,A+N);
     Tri[j] = false;
    if(A[2]*A[2] == A[1]*A[1] + A[0]*A[0]&&A[0] !=0) {
      Tri[j] =true;
    }
  }
  for(int i =0;i < N;i++){
    if(Tri[i])
      cout <<"YES"<<endl;
    else
      cout <<"NO"<<endl;
  }
  return 0;
}

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

void Judgetriangle(int a, int b, int c);
void judge(int a, int b, int c);
int a, b, c;
bool flag = false;
int main(void)
{
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i)
        {
            flag = false;
            scanf("%d %d %d", &a, &b, &c);
            Judgetriangle(a, b, c);
        }
    return 0;
}

void Judgetriangle(int a, int b, int c)
{
    judge (a, b, c);
    judge (a, c, b);
    judge (b, c, a);
    if (flag == true) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}

void judge(int a, int b, int c)
{
    if (a * a + b * b == c * c) {
        flag = true;
    }
}

C++: #include <stdio.h>

int hantei(int l1,int l2,int l3);
//??´?§?????§???¢??????????????????????????????????????????

int main(void)
{
	int kaisuu, l1, l2, l3;
	scanf("%d", &kaisuu);
	for(int i = 0; i < kaisuu; i++) {
		scanf("%d %d %d", &l1, &l2, &l3);
		if(hantei(l1, l2, l3) == 1) {
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

int hantei(int l1,int l2,int l3)
{
	int llong, lshort1, lshort2;
	if(l1 <= l2) {
		lshort1 = l1 ^ 2;
		if(l2 <= l3) {
			lshort2 = l2 ^ 2;
			llong = l3 ^ 2;
		}else{
			lshort2 = l3 ^ 2;
			llong = l2 ^ 2;
		}
	}else{
		lshort1 = l2 ^ 2;
		if(l1 <= l3) {
			lshort2 = l1 ^ 2;
			llong = l3 ^ 2;
		}else{
			lshort2 = l3 ^ 2;
			llong = l1 ^ 2;
		}
	}
	if(lshort1+ lshort2 == llong) {
		return 1;
	}else{
		return 0;
	}
}

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

int main()
{
priority_queue<int> que;
int n;
cin>>n;
fot(int i=0;i<n;i++)
{
int a,b,c;
for(int j=0;j<3;j++)
{
cin>>a;
que.push(a);
}
a=que.top();
que.pop();
b=que.top()
que.pop();
c=que.top()
que.pop();
if(a-b<c)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
return 0;
}

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

int main(){
    
    int num,a,b,c;
    cin >> num;
    
    for(int ii=0;ii<num;ii++){
        cin >> a >> b >> c;
        
        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;
    int a, b, c;

    cin >> n;

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

      cin >> a >> b >> c;

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

    return 0;
}