Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i := 0; i < n; i++ {
		data := nextInts(3)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

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

using namespace std;

int main()
{
    int ignore;
    cin >> ignore;
    int fi;
    int se;
    int th;
    vector<int> v;

    while(cin >> fi >> se >> th)
    {
        v.push_back(fi);
        v.push_back(se);
        v.push_back(th);
        sort(v.begin(), v.end(), greater<int>());
        if(v[0] * v[0] == v[1] * v[1] + v[2] * v[2])
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }
}

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

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
typedef vector<vector<bool>> vvb;
typedef pair<int,int> P;
#define vrep(v,n) for(int i=0;i<n;i++){cin >> v.at(i);} //配列vにn個の要素を入力する
#define rep(i, l, n) for (int i = l; i < (int)(n); i++)
#define repn(i, l, n) for (int i = l; i <= (int)(n); i++)
#define pb push_back 

const int mod = 1000000007;
const int inf = 1e9;

int main(){
    int n;
    cin >> n;
    rep(i,0,n){
        int a,b,c;
        cin >> a >> b >> c;
        a = pow(a,2);
        b = pow(b,2);
        c = pow(c,2);
        bool flag = false;
        if(a+b==c||b+c==a||c+a==b) flag = true;
        printf("%s\n", flag?"YES":"NO");
    }
}

C++: #include<stdio.h>

int main(){
        int i = 0;
        int n,len[3];
        scanf("%d",&n);
        while(i != n){
                scanf("%d %d %d",&len[0],&len[1],&len[2]);
                if(len[0] * len[0] + len[1] * len[1] == len[2] * len[2]){
                        printf("YES\n");
                }else{
                        printf("NO\n");
                }
                i++;
        }
        return 0;
}

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

void F(int *a, int*b) {
	int x;
	x = *a;
	*a = *b;
	*b = x;
}

int main() {
	int n, a, b, c;
	cin >> n;
	for (int i = 0;i < n;i++) {
		cin >> a >> b >> c;
		if (c < a)
			F(&c, &a);
		if (c < b)
			F(&c, &b);

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

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

C++: #include<stdio.h>
struct EQ{
  float x;
  float y;
  float a;
};

float fy(struct EQ,struct EQ);
float fx(struct EQ,struct EQ);


int main(void){

  struct EQ eq1,eq2;
  float x,y;
 while(scanf("%f %f %f %f %f %f",&eq1.x,&eq1.y,&eq1.a,&eq2.x,&eq2.y,&eq2.a)!=EOF){
 
   y=fy(eq1,eq2);
   x=fx(eq1,eq2);
 printf("%0.3f %0.3f\n",x,y); 
 }
  return 0;
  }

float fy(struct EQ eq1,struct EQ eq2){

  float y,a,x;

  if(eq1.x==0 && eq1.a!=0){ 

    if(eq1.y<0){
      eq1.y=-eq1.y;
      eq1.a=-eq1.a;
    }
    y=eq1.a/eq1.y;
  }
 
  else if(eq2.x==0 && eq2.a!=0){ 

    if(eq2.y<0){
      eq2.y=-eq2.y;
      eq2.a=-eq2.a;
    }
    y=eq2.a/eq2.y;
  }
  else if(eq1.x==0 && eq1.a==0){  
    y=0;
  }
  else if(eq2.x==0 && eq2.a==0){
    y=0;
  }

  else{

  eq1.y=eq1.y/eq1.x;
  eq1.a=eq1.a/eq1.x;
 
  eq2.y=eq2.y/eq2.x;
  eq2.a=eq2.a/eq2.x;

   y=eq1.y-eq2.y;
  a=eq1.a-eq2.a;
  if(y<0){
    y=-y;
    a=-a;
  }

   y=a/y;

  if(y==-0){
    y=0;
  }


  }
  return y;

  }

float fx(struct EQ eq1,struct EQ eq2){

  float x,a;

  if(eq1.y==0 && eq1.a!=0){ 
    
    if(eq1.x<0){
      eq1.x=-eq1.x;
      eq1.a=-eq1.a;
    }
    x=eq1.a/eq1.x;
  }
  
  else if(eq2.y==0 && eq2.a!=0){ 
    
    if(eq2.x<0){
      eq2.x=-eq2.x;
      eq2.a=-eq2.a;
    }
    x=eq2.a/eq2.x;
  }
  else if(eq1.y==0 && eq1.a==0){  
    x=0;
  }
  else if(eq2.y==0 && eq2.a==0){
    x=0;
  }

  else{

  eq1.x=eq1.x/eq1.y;
  eq1.a=eq1.a/eq1.y;

  eq2.x=eq2.x/eq2.y;
  eq2.a=eq2.a/eq2.y;

  x=eq1.x-eq2.x;
  a=eq1.a-eq2.a;

  if(x<0){
    x=-x;
    a=-a;
  }
 
  x=a/x;

  if(x==-0){
    x=0;
  }

  }

  return x;

  }

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

using namespace std;

int main() {
	int n;
	scanf ("%d", &n);
	while (n--) {
		int a, b, c;
		scanf ("%d%d%d", &a, &b, &c);
		if (a + b > c && a + c > b && b + c > a) {
			a *= a, b *= b, c *= c;
			 if (a + b == c || a + c == b || b + c == a) printf ("YES\n");
			 else printf ("NO\n");
		}
		else printf ("NO\n");
	}
	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<string>
#include<vector>
#include<set>
#include<algorithm>
#include<map>
#include<cmath>

using namespace std;

int main()
{
	int m,a,b,c;
	while(cin>>a>>b>>c)
	{
		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>
using namespace std;

int main(){
	int a,b,c,n,t;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a>>b>>c;
		if(a<b){
			t=a;
			a=b;
			b=t;
		}
		if(a<c){
			t=a;
			a=c;
			c=t;
		}
		cout<<a*a==b*b+c*c ? "YES\n" : "NO\n";
	}
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<int, int> pint;
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define IREP(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
#define ALL(x) (x).begin(), (x).end()
#define MOD 1000000007
#define IMAX INT_MAX
#define IMIN INT_MIN
#define LMAX LLONG_MAX
#define LMIN LLONG_MIN
template<typename T> inline void chmin(T &a, T b){ if(a > b) a = b; }
template<typename T> inline void chmax(T &a, T b){ if(a < b) a = b; }
template<typename T> inline void xch(T &a, T &b){ T w = a; a = b; b = w; }


int main() {
    int N; cin >> N;
    REP(notc, N){
        int sum = 0, max = 0;
        REP(i, 3){
            int a; cin >> a;
            sum += a * a;
            chmax(max, a * a);
        }
        cout << (((sum - max) == max) ? "YES" : "NO") << endl;
    }
    
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <cmath>

#define MAX(a,b) (a > b ? a : b)
int main(void){
	int c;
	scanf("%d",&c);
	for(;c;c--){
		int x,y,z;
		bool f;
		scanf("%d%d%d",&x,&y,&z);
		if(MAX(z,MAX(x,y))==x)
			f = (pow(y,2) + pow(z,2) == pow(x,2));
		else{
			if(MAX(z,MAX(x,y))==y)
				f = (pow(x,2) + pow(z,2) == pow(y,2));
			else
				f= (pow(x,2)+pow(y,2)==pow(z,2));
		}
		std::cout << (f?"YES":"NO") << std::endl;
	}
	return 0;
}