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;

void judgement(unsigned int a, unsigned int b, unsigned 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() {
	unsigned int n;//dataset

	cin >> n;

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

	for (int i = 0; i < n; i++)
	{
		unsigned 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 <bits/stdc++.h>

using namespace std;

int main()
{
    int n; cin >> n;
    while (n--) {
        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\n";
        else cout << "NO\n";
    }
}

C++: #include <stdio.h>
int main(void){
   int i,N,a,b,c;
   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)
     && (a > 0 && b > 0 && c > 0)) {
       printf("YES\n");
   }
 else {
   printf("NO\n");
 }  
     }
   return 0;   
}

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

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

int main() {
	unsigned 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<stdio.h>
#include<string.h>
#define N 3

int main()
{
    int i, j, a, b, c;
    int A[N][N];

    scanf("%d",&a);
    if(a<=1000){
        for(i=0;i<a;i++){
            for(j=0;j<N;j++){
                scanf("%d", &b);
                if(1<=b && b<=1000){ 
                    if(j!=0 && b<A[i][j-1]){
                        c = A[i][j-1];
                        A[i][j-1] = b;
                        A[i][j] = c;
                    }else{
                        A[i][j] = b;
                    }
                }
            }

        }
        for(i=0;i<a;i++){
            if(A[i][0]*A[i][0]+A[i][1]*A[i][1]==A[i][2]*A[i][2]){
                printf("YES\n");
            }else{
                printf("NO\n");
            }
        }
    }
    return 0;
}

C++: #include <iostream>

inline bool is_right_triangle(u_int a, u_int b, u_int c) {
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}

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

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

    return 0;
}

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

using namespace std;

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

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

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

bool right_triangle(int x, int y, int z); 

int main(void)
{
    int n, a, b, c;
    scanf("%d",&n);
    for(int i = 0; i < n; i++){
        scanf("%d %d %d", &a, &b, &c);
        if(right_triangle(a, b, c)){
            printf("YES\n");
        }else{
            printf("NO/n");
        }
    }
    return 0;
}

bool right_triangle(int x, int y, int z)
{
    if(x*x + y*y = z*z || x*x +  z*z = y*y || z*z+ y*y = x*x ){
        return true;
    }
    return false;
}

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