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>
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 && b<a+c && c<a+b) cout<< "YES" << endl;else cout << "NO" << endl;
}
return 0;
}

C++: #include<stdio.h>

void swap(int *x,int *y)
{
	int temp = *x;
	*x=*y;
	*y=temp;
}

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

	for(int i=0;i<count;i++)
	{
		int a,b,c;
		scanf("%d %d %d",&a,&b,&c);
		if(a<b)
			swap(&a,&b);
		if(a<c)
			swap(&a,&c);
		if(a*a > b*c)
			printf("YES\n");
		else
			printf("NO\n");
	}

}

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

C++: #include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<math.h>
#include<iostream>
#include<stack>
#include<queue>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
using namespace std;

#define LL long long
 int main()
{
    LL t,a[5];
    cin>>t;
    while(t--)
    {
        for(LL i=0;i<3;i++)
        cin>>a[i];
        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 <iostream>

using namespace std;

void swap(int x, int y) {
  int temp;
  temp = x;
  x = y;
  y = temp;
}

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

  cin >> n;
  while(1) {
    cin >> a >> b >> c;

    if (a > b) {
      swap(a, b);
    }
    if (b > c) {
      swap(b, c);
    }
    if (a > c) {
      swap(a, c);
    }
    
    if (a*a + b*b == c*c) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }

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

        cout << a2 << b2 << c2 << endl;

        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;

void swap(int x, int y) {
  int temp;
  temp = x;
  x = y;
  y = temp;
}

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

  cin >> n;
  while(n > 0) {
    n--;
    cin >> a >> b >> c;

    if (a > b) {
      swap(a, b);
    }
    if (b > c) {
      swap(b, c);
    }
    if (a > c) {
      swap(a, c);
    }
    
    if (a*a + b*b == c*c) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }

  return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 //10^9+7
#define INF 1000000000 //10^9

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

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

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

  cin >> n;
  while(n-- > 0) {
    cin >> a >> b >> c;

    int array[3] = { a, b, c };
    sort(array, array+3);

    if(array[0]*array[0] + array[1]*array[1] == array[2]*array[2]) {
      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 && b<a+c && c<a+b) cout<<"YES"<<endl;else cout<<"NO"<<endl;
}
return 0;
}

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

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

#define PI ( atan2(1,1) * 4)

double trigon_angle(double a, double b, double c){
	double ans;
	ans = (b*b + c*c - a*a) / (2*b*c);
	ans = atan2(sqrt(1-ans * ans),ans);
	return ans* 180 / PI;
}
int main(void) {
	int i,c,n,hen[3];
	double h,a;
	scanf("%d",&n);
	
	for(i = 0; n > i; i++){
		scanf("%d%d%d",&hen[0], &hen[1], &hen[2]);
		for(c = 0; 3 > c; c++){
			a = trigon_angle(hen[c], hen[(c+1)%3], hen[(c+2)%3]);
			if((int)a == 90) {printf("YES\n");break;}
		}
		if(3 == c)printf("NO\n");
	}
	return 0;
}

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

int main()
{
	int n, a[1000][3];
	cin >> n;
	for (int i = 0;i < n;i++) {
		cin >> a[i][0] >> a[i][1] >> a[i][2];
		int x = a[i][0] * a[i][0], y = a[i][1] * a[i][1], z = a[i][2] * a[i][2];
		if (x == y + z || y == z + x || z == x + y) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n=0;
	cin>>n;
	int a,b,c;
	int x,y,z;
	for(int i=1;i<=n;i++){
		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>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <string>
int main()
{
    int a,b,c,n,i;
    scanf("%d",&n);
    for (i=1;i<=n;i++)
    {
        scanf("%d %d %d",&a,&b,&c);
        if ((a*a+b*b==c*c)||(a*a+c*c==b*b)||(b*b+c*c==a*a))
            printf("%s","YES\n");
        else
            printf("%s","NO\n");
    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(void){
    int n;
    vector<int> a(3);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[0]>>a[1]>>a[2];
        sort(a.begin(),a.end());
        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])cout<<"YES"<<endl;
        else cout<<"NO"<<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;
    int temp;
    cin >> a >> b >> c;
    if(a<b){
      temp = a;
      a = b;
      b = temp;
    }
    if(a<c){
      temp = a;
      a = c;
      c = temp;
    }

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

  return 0;
}