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 <iostream>
#include <math.h>

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	int max_num = max(a, max(b, c));
	int sub1, sub2;
	if (max_num != a) {
		sub1 = a;
		if (max_num != b) sub2 = b;
		else sub2 = c;
	} else if (max_num != b) {
		sub1 = b;
		sub2 = c;
	} 		
	if (pow(max_num, 2) == pow(sub1, 2) + pow(sub2, 2)) f = true;
	if (f) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main() {
	int num, a, b, c;
	cin >> num;
	for (int i=0; i<num; i++) {
		cin >> a >> b >> c;
		solve(a,b,c);
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n;
cin >> n;
for(int m = 1;m <= n;m++){
int a[3];
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;
}
return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;

#define FOR(i,s,e) for (int i = int(s); i != int(e); i++)
#define REP(i,e) for (int i = 0; i != int(e); i++)
#define FORIT(i, A) for (auto i : A)
#define ISEQ(c) (c).begin(), (c).end()
#define PRINT(x) cout << (x) << endl
#define SZ(x) ((int)(x).size())

int main(int argc, char const *argv[])
{
	int l;
	scanf("%d", &l);
	REP(i,l)
	{
		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 <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int main() {
	int n; cin >> n;
	
	for (int rep = 0; rep < n; rep++) {
		
		vector<int> bar(3); cin >> bar[0] >> bar[1] >> bar[2];
		
		sort(bar.begin(), bar.end());
		if (pow(bar[2], 2) == pow(bar[1], 2) + pow(bar[0], 2)) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	
	return 0;
}

C++: #include <iostream>

int main()
{
    int n;
    std::cin >> n;

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

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

using namespace std;

long dd(int n){
	return n*n;
}

int main(){
	int n, t[3];
	
	cin >> n;
	for(int i=0; i<n; ++i){
		for(int j=0; j<3; ++j)
		scanf(" %d", &t[j]);
	 		
		sort(t, t+3);
		
		if( dd(t[2]) == dd(t[0])+dd(t[1]) ) printf("YES\n");
		else printf("NO\n");
	}
	 
	return 0;
}

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

string Right(int a,int b,int c){
    string s;
    if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
        s = "YES";
    else s="NO";

    return s;
}

int main(){
    int n;
    int a,b,c;
    string s;
    while(cin >> n){
        for(int i=0;i<n;i++){
            cin >> a >> b >> c;
            s = Right(a,b,c);
            cout << s << endl;
        }
    }

    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>

int main() {
    int n;
    std::vector<int> V;
    
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int a, b, c; std::cin >> a >> b >> c;
        V.push_back(a); V.push_back(b); V.push_back(c);
        std::sort(V.begin(), V.end());
        if (pow(V[2], 2) == pow(V[0], 2) + pow(V[1], 2)) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int N;
int x[3];
int main(){
cin>>N;
while(N>0){
for(int i=0;i<3;i++){
cin>>x[i];
}
sort(x,x+3);
if(x[0]^2==(x[1]^2)+(x[2]^2)){
cout<<"YES"<<endl;
}
else{ 
cout<<"NO"<<endl;
}
N--;
}
return 0;
}

C++: #include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main() {
	int n;
	scanf(" %d", &n);
	rep(i,n) {
		vector<int> l(3);
		rep(j,3) {
			scanf(" %d", &l[j]);
		}
		int maxl = max<int>(l[0], max<int>(l[1], l[2]));
		for(int k = 0; k < 3; k++) {
			if(l[k] == maxl) {
				l[k] = 0;
				break;
			}
		}
		int s = 0;
		rep(k, 3) {
			s += l[k] * l[k];
		}
		puts(maxl * maxl == s ? "YES" : "NO");
	}
	return 0;
}

C++: #include <iostream>

using namespace std;


bool check( int a, int b, int c )
{
	if( ( a * a ) == ( b * b ) + ( c * c ) )
	{
		return true;
	}else{
		return false;
	}
}
int main()
{
	int a, b, c, max;

	while( cin >> a >> b >> c )
	{
		if( check( a, b, c ) || check( b, a, c ) || check( c, a, b ) )
		{
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
		
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int N;
int a[3]; 
int b,c,d;

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    b = a[1]*a[1];
    c = a[2]*a[2];
    d = a[3]*a[3];
    if ( b + c == d ) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  
}

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

int main()
{
  int n;
  int side[3];
  cin >> n;

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

    for (int j = 0; j <= 2; j++){
      cin >> side[j];
    }
    for (int j = 0; j < 2; j++){
      if (side[j] >= side[j + 1]){
        int s = side[j + 1];
        side[j + 1] = side[j];
        side[j] = s;
      }
    }
    if ((side[2] * side[2]) == ((side[0] * side[0]) + (side[1] * side[1]))){
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  
  return 0;
}

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

int main(){
    int times;
    cin >> times;

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

        double a2, b2, c2;
        a2 = pow(a,2);
        b2 = pow(b,2);
        c2 = pow(c,2);

        if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

int main()
{
 int a,b,c,n;
 while (cin>>n)
 for(int i=0;i<=n;i++)
  {
  while(cin>>a,b,c)
{
int asq=a*a,bsq=b*b,csq=c*c;
if(asq+bsq==csq||bsq+csq==asq||

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

int main(){
	int n, a, b, c, x, y, z;
	
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(y*y + z*z == x*x)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main(){
    int q;
    cin>>q;
    while(q--){
        int a[3];
        cin>>a[0]>>a[1]>>a[2];
        sort(a, a+3);
        if(pow(a[2], 2)==pow(a[1],2)+pow(a[0], 2))
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}