Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

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)
	    sort.Ints(data)
	    if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
	        fmt.Fprintln(out, "YES")
	    }else{
	        fmt.Fprintln(out, "NO")
	    }
	}
}

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
}

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

int main(){
    int a[5];
    int t;
    cin>>t;
    while(t--){
        for(int i=0;i<3;++i){
            cin>>a[i];
        }
        sort(a,a+2);
        int t1,t2,t3;
        t1 = a[2];
        t2 = a[1];
        t3 = a[0];
        if(t1*t1 == t2*t2 + t3*t3){
            cout << "YES" << endl;
        }
        else cout << "NO" << endl;
    }
    return 0;
}

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

int main(){
	int n=0,i=0,k=0,a,b;
	int x[100] = {0} ;
	char y[100] ={0} ;

	cin >> n ;

	for(i=0;i<3*n;i+=3){
		cin >> x[i] >> x[i+1] >> x[i+2] ;

		if(x[i+1] > x[i]) {
			k = x[i+1];
			x[i+1] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i]) {
			k = x[i+2];
			x[i+2] = x[i];
			x[i] = k ;
		}
		if(x[i+2] > x[i+1]) {
			k = x[i+2];
			x[i+2] = x[i+1];
			x[i+1] = k ;
		}
	}

	for(i=0;i< 3*n; i+=3){
				a = x[i] * x[i] ;
		b = (x[i+1] * x[i+1] ) + (x[i+2] * x[i+2]) ;

		if( a == b) cout << "YES" << endl ;
		if( a != b) cout << "NO" << endl ;

	}

    return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
string heihou(int a,int b,int c)
{
	if (a*a == b*b + c*c || b*b == a*a + c*c || c*c==a*a+b*b){
		return "YES";
	}
	else{
		return "NO";
	}
}
int main()
{
	int dataset[999][2];
	int i = 0;
	int l;
	cin >> l;
	while (i<l){
		cin >> dataset[i][0] >> dataset[i][1] >> dataset[i][2]; 
		i++;
	}
	for (int j = 0; j < i; j++){
		cout << heihou(dataset[j][0], dataset[j][1], dataset[j][2])<< endl;
	}

	return 0;
}

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 <stdio.h>

enum {YES, NO} yn;

int tri_judge(int x, int y, int z);
int pow2(int x);

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

    int side1, side2, side3;
    while (dataset--){
        scanf("%d %d %d", &side1, &side2, &side3);
        yn = tri_judge(side1, side2, side3);
        if (yn == YES){
            printf("YES\n");
        } else {
            printf("NO\n");
        }

    }

    return 0;
}

int tri_judge(int x, int y, int z)
{
    if (pow2(x) == pow2(y) + pow2(z)){
        yn = YES;
    } else if (pow2(y) == pow2(z) + pow2(x)){
        yn = YES;
    } else if (pow2(z) == pow2(x) + pow2(y)){
        yn = YES;
    } else {
        yn = NO;
    }

    return yn;
}

int pow2(int x)
{
    return x * x;
}

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

bool JudgeTriangle(int a, int b, int c)
{
    std::vector<int> numbers;
    numbers.push_back(a);
    numbers.push_back(b);
    numbers.push_back(c);
    std::sort(numbers.begin(), numbers.end());
    
    c = numbers[2];
    b = numbers[1];
    a = numbers[0];
    return (a*a+b*b == c*c);
}

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

    return 0;
}

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

bool judge_triangle(int j_edge[])
{
    std::sort(j_edge, j_edge + 3);
    return j_edge[2] * j_edge[2] == j_edge[0] * j_edge[0] + j_edge[1] * j_edge[1];
}

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

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

        int edge[3];
        std::cin >> edge[0] >> edge[1] >> edge[2];

        if(judge_triangle(edge)) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }

    }
}

// "j_edge" to "j_edge+3" ha "array j_edge" no memory jyou no
// adress no hajimari to owari wo simesu. 
// Yoku miru to kou natteru ==> [hajimari, owari)

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

void judgement(int a, int b, int c) {
	if ((a ^ 2) == (b ^ 2) + (c ^ 2) || (b ^ 2) == (a ^ 2) + (c ^ 2) || (c ^ 2) == (a ^ 2) + (b ^ 2)) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

int main() {
	int n;//dataset

	cin >> n;

	vector<int> vector_a;
	vector<int> vector_b;
	vector<int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	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+2);
		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 <iostream>
#include <cmath>
#include <vector>
#include <algorithm>

#define eN 1000

using namespace std;

bool check(int e1, int e2, int e3){
	if (((e1*e1)+(e2*e2)) == (e3*e3)){
		return true;
	}
	else{
		return false;
	}
}

int main(void){
	int N;
	cin >> N;
	vector<bool> result;

	for (int i=0; i<N; ++i){
		int e1, e2, e3;
		vector<int> len;
		cin >> e1 >> e2 >> e3;
		len.push_back(e1);
		len.push_back(e2);
		len.push_back(e3);
		sort(len.begin(), len.end());
		result.push_back(check(len[0],len[1],len[2]));
	}
	vector<bool>::iterator res = result.begin();

	while (res != result.end()){
		if (*res == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
		++res;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <math.h>
#include <vector>
#include <queue>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
using namespace std;
#define rep(I,N) for(int I = 0; I < (int)(N); I++)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;

int main(void){
	int N;
	cin >> N;
	rep(k, 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(c == sqrt(a + b))flag = true;
		if(b == sqrt(a + c))flag = true;
		if(a == sqrt(b + c))flag = true;
		if(flag)cout << "YES"<<endl;
		else FIN("NO");

	}

	return 0;	
}

C++: #include <map>
#include <string>
#include <iostream>
#include<vector>
#include <set>
#include<math.h>
#include<algorithm>

using namespace std;

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