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 <array>
#include <algorithm>
#include <cstdio>

using namespace std;

int main() {
    array<int, 3> sides;
    int n;
    scanf("%d", &n);

    for (int i = 0; i < n; ++i)
    {
        scanf("%d %d %d", &sides[0], &sides[1], &sides[2]);
        sort(sides.begin(), sides.end());
        printf(sides[2] * sides[2] == sides[0] * sides[0] + sides[1] * sides[1] ? "YES\n" : "NO\n");
    }

    return 0;
}

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

int main(){
	using namespace std;
	while(1){
		int n;
		long long int a[3] = { 0 };
		cin >> n;
		if(cin.eof() || n == 0) break;
		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])) cout << "YES" << endl;
			else cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
  int a,b,c,n,t,i;
  cin >> n;
  for(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;
       }
      if(b>c)
       {
          t = b;
          b = c;
          c = t;
       }
     if(a*a + b*b == c*c)
         cout << "YES" << endl;
     else
         cout << "NO"  << endl;
    }
   return 0;
}

C++: #include<stdio.h>


int main(){
	int N = 0 ,i,j,k,cheak = 0,tmp = 0;
	int tri[3] = {0,0,04};
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&tri[0],&tri[1],&tri[2]);
		for(j = 0;j <= 2;j++){
			for(k = j + 1;k <= 2;k++){
				tmp = tri[j];
				tri[j] = tri[k];
				tri[k] = tmp;
			}
		}
		if(tri[0] * tri[0] == tri[1] * tri[1] + tri[2] * tri[2]){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

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

bool check(const int* array);
int main(void) {
    int length[3];
    int n;
    
    cin >> n;
    
    for(int i = 0; i < n; ++i) {
        cin >> length[0] >> length[1] >> length[2];
        sort(length, length + 3);
        if(check(length)) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

bool check(const int* array) {
    if(array[0] * array[0] + array[1] * array[1] == array[2] * array[2]) {
        return true;
    } else {
        return false;
    }
}

C++: #include <iostream>

void printN (int N);
int main()
{
    int N;
    std::cin >> N;
    printN (N);
	return 0;
    }

void printN (int N)
{
    for (int i = 0; i < N; ++i) {
        int x, y, z;
        std::cin >> x >> y >> z;
        if (x * x + y * y == z * z) {
        std::cout << "YES" << std::endl;
        } else if (y * y + z * z == x * x) {
        std::cout << "YES" << std::endl;
        } else if (z * z + x * x == y * y) {
        std::cout << "YES" << std::endl;
        } else {
        std::cout << "NO" << std::endl;
        }
    }
}

C++: #include <iostream>

using namespace std;

int main()
{
    int n, a, b, c;
    cin >> n;
    while(n--){
        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\n";
        else
            cout<<"NO\n"; 
    }
    return 0;
}

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

using namespace std;

int main(){
	int a,b,c,n,i;
	cin >> n;
	for( i = 0; i < n; i++ ){
		cin >> a >> b >> c;
		if(a*a + b*b == c*c){
			cout << "YES" << endl;
		}
		else if(a*a + c*c == b*b){
			cout << "YES" << endl;
		}
		else if(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[3];
    int n;
    cin >> n;
    for (int i = 0; i < n; i++){
	cin >> a[0] >> a[1] >> a[2];
	sort(a, a + 3);
	if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) puts("YES");
	else puts("NO");
    }
    return 0;
}

C++: #include <iostream>
#include <cmath>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main()
{
    int a,b,c,N;
    priority_queue< int, vector<int>, greater<int> > que;
    cin >> N;
    REP(i,N) {
        cin >> a >> b >> c;
        que.push(a);que.push(b);que.push(c);
        c=que.top();
        que.pop();
        b=que.top();
        que.pop();
        a=que.top();
        que.pop();
        if (a*a+b*b==c*c) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
	int a[10000] = { 0 }, b[10000] = { 0 }, c[10000] = { 0 };
	int n;
	int d[10000], e[10000], f[10000], g[10000];
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		d[i] = a[i] * a[i];
		e[i] = b[i] * b[i];
		f[i] = c[i] * c[i];
		g[i] = d[i] + e[i] + f[i];
	}
	for (int j = 0; j < n; j++) {
		if (g[j] == 2*d[j] || g[j] == 2*e[j] || g[j] == 2*f[j]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <cstdlib>
#include <vector>
#include <math.h>
using namespace std;

int main(){
	vector<vector<int> > a;

	int lines = 0;
	scanf("%d", &lines);

	bool isOk[lines];
	for (int i = 0; i < lines; ++i)
	{
		int l[3];
		for (int j = 0; j < 3; ++j)
			scanf("%d", &l[j]);

		if(pow(l[0], 2.0) + pow(l[1], 2.0) == pow(l[2], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[1], 2.0) + pow(l[2], 2.0) == pow(l[0], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[2], 2.0) + pow(l[0], 2.0) == pow(l[1], 2.0)) isOk[i] = true;
	}

	for (int i = 0; i < lines; ++i)
	{
		if(isOk[i]) printf("YES\n");
		else printf("NO\n");
	}
}

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

int pow(int i){return i*i;}

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

C++: #include <bits/stdc++.h>
#define LL long long
#define ULL unsigned long long
#define rep(i, n) for (int i=0; i<(n); i++)
#define rep2(i, x, n) for (int i=x; i<(n); i++)
using namespace std;
int main(){
    
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n;
    cin >> n;
    
    rep(i,n){
        
        int a, b, c;
        cin >> a >> b >> c;
        
        if(a>b&&a>c){
            cout << ( (a == b) == c ? "NO" : b*b + c*c == a*a ? "YES" : "NO" ) << endl;
        }else if(b>a&&b>c){
            cout << ( (a == b) == c ? "NO" : a*a + c*c == b*b ? "YES" : "NO" ) << endl;
        }else{
            cout << ( (a == b) == c ? "NO" : a*a + b*b == c*c ? "YES" : "NO" ) << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        
        if( (a^2) + (b^2)  == (c^2) ){ printf("YES\n"); }
        else if( (b^2) + (c^2)  == (a^2)){ printf("YES\n"); } 
        else if( (c^2) + (b^2)  == (a^2)){ printf("YES\n"); }
        else{ printf("NO\n"); }
    }
}