Go: package main

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

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		for i, c := range strings.Split(sc.Text(), " ") {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		sort.IntSlice(edges).Sort()
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

C++: #include <stdio.h>

int right(int x, int y, int z);

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

int right(int x, int y, int z)
{
    if (x * x == y * y + z * z) {
	return 1;
    } else if (y * y ==  x * x + z * z) {
	return 1;
    } else if (z * z == x * x + y * y) {
	return 1;
    } else {
	return 0;
    }
}

C++: #include <iostream>

using namespace std;

int main() {
  int a, b, c;
  int N;
  for (int i = 0; i < N; i++) {
    cin >> a >> b >> c;
    a = a * a;
    b = b * b;
    c = c * 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 ans=0;
int N,a,b,c;
cin>>N;
for(int i=0;i<N;i++){
cin>>a>>b>>c;
if(a*a==b*b+c*c){
ans+=ans;}
else if(b*b==a*a+c*c){
ans+=ans;}
else if(c*c==a*a+b*b){
ans+=ans;}
if(ans>0){
cout<<"YES"<<endl;}
else{
cout<<"NO"<<endl;}
}
return 0;
}

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

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define ALL(a) (a).begin(),(a).end()
#define MIN(a,b) (a>b?b:a)
#define MAX(a,b) (a>b?a:b)

int main(void)
{
  int N;
  cin >> N;

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

  return 0;
}

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

int main() {
int a[3];
while(cin >> a[0] >> a[1] >> a[2]) {
sort(a, a+2);
if(a[1] * a[1] + a[0] * a[0] == a[2] * a[2]) cout << "YES" << endl;
else cout << "NO" << endl;
}
return 0;
}

C++: #include <iostream>

int main(){
	int a, b, c, n, a2, b2, c2;
	std::cin >> n;
	for(int i=0; i<n; i++){
		std::cin >> a >> b >> c;
		a2 = a * a;
		b2 = b * b;
		c2 = c * c;
		if(a2 + b2 == c2 || b2 + c2 == a2 || c2 + a2 == b2)
			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;
		if(a*a+b*b==c*c){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}	
}

C++: ///
// File:  0003.cpp
// Author: ymiyamoto
//
// Created on Sat Nov  4 15:48:51 2017
//

#include <cstdint>
#include <iostream>

using namespace std;

int32_t main()
{
  uint32_t N;
  cin >> N;
  for (uint32_t i = 0; i < N; i++) {
    uint32_t a, b, c;
    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;
}

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

using namespace std;

int N;
int sides[3];

bool rtt(int* arr){
    for(int i = 0; i < 3; i++){
        if(arr[i] * arr[i] == arr[(i + 1) % 3] * arr[(i + 1) % 3] + arr[(i + 2) % 3] * arr[(i + 2) % 3]){
            return true;
        }
    }
    return false;
}

int main(){
    cin >> N;
    for(int i = 0; i < N; i++){
        cin >> sides[0] >> sides[1] >> sides[2];
        if(rtt(sides)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

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

int main()
{
    int a,b,c,n;
    cin>>n;
    while(n>0){
        cin>>a>>b>>c;
        n--;
        if(a*a==b*b+c*c)
            cout<<"Yes"<<endl;
        else if(b*b==a*a+c*c)
            cout<<"Yes"<<endl;
        else if(c*c==a*a+b*b)
            cout<<"Yes"<<endl;
        else
            cout<<"No"<<endl;
    }
    return 0;
}

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

int main(){

	int i,j,n;
	int a[3];

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

C++: 
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
	int N,a,b,c,i=0;
	cin>>N;
		while(N--)
		{
			cin>>a>>b>>c;
			if (a*a+b*b==c*c)
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
	return 0;
}

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

int main(){
	int n;
	cin >> n;
	bool judge[n];
	for(int i = 0; i < n; i++){
		int length[3];
		for(int j = 0; j < 3; j++){
			cin >> length[j];
		}
		sort(length,length+3);
		if(length[0]*length[0]+length[1]*length[1] == length[2]*length[2]){
			judge[i] = true;
		}
		else{
			judge[i] = false;
		}
	}
	for(int i = 0; i < n; i++){
		if(judge[i] == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
}

C++: #include<cstdio>
#include<string>
#include<iostream>
#include<algorithm>
#define _USE_MATH_DEFINES
#include<math.h>
#include<queue>
#include<set>
#include<vector>
#define INF 100000000

#define MAX_N 100
#define MAX_set 200

typedef long long int ll;
using namespace std;


int main(){

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

	for(int i = 0; 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("YES\n");
		else
			printf("NO\n");
	}

}

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

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

int main() {
	// your code goes here
	int n;
	cin >> n;
	for (int i;i<n;i++) {
		int a,b,c;
		cin >> a >> b >>c;
		int aa,bb,cc;
		if (b>a) {
			aa = b;
			bb = a;
			
		}
		else{
			aa = a;
			bb = b;
		}
		if (c>aa) {
			cc =bb;
			bb=aa;
			aa = c;
		}
		else if (c>bb) {
				cc = bb;
				bb = c;
			}
		
		if (aa*aa == bb*bb+cc*cc) cout << "YES" <<endl;
		else cout << "NO" <<endl;
	}
	return 0;
}

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

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

	cin >> n;

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 3; j++)
			cin >> a[j];

		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<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<string>
#include<functional>
#include<queue>
#include<math.h>
#define INF 999999

using namespace std;

int max_three(int a, int b, int c)
{
	int max_ab = max(a, b);
	int ans = max(max_ab, c);

	return ans;
}

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

	int a[3];
	vector<string> ans;
	for (int i = 0; i < n; i++) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) {
			ans.push_back("YES");
		}
		else ans.push_back("NO");
		
	}

	for (int i = 0; i < ans.size(); i++) {
		cout << ans[i] << endl;
	}

	return 0;
}