Go: package main

import (
	"fmt"
)

func main() {
	lines := [3]int{}
	var round int
	fmt.Scan(&round)
	for r := 0; r < round; r++ {
		fmt.Scan(&lines[0], &lines[1], &lines[2])

		if lines[0] > lines[1] && lines[0] > lines[2] {

		} else if lines[2] > lines[1] {
			tmp := lines[0]
			lines[0] = lines[2]
			lines[2] = tmp
		} else {
			tmp := lines[0]
			lines[0] = lines[1]
			lines[1] = tmp
		}

		if lines[1]*lines[1]+lines[2]*lines[2] == lines[0]*lines[0] {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

int main() {
/*	int a[3];
	cin >> a[0] ;
	a[1] = 3;
	a[2] = a[0] * 10;

	cout << a[0] <<" " << a[1] <<" "<< a[2] << endl;
	
	for (int i = 0; i < 3; i++) {
		cout << a[i] << endl;
	}


	sort(a,a+5);
*//*
	int a[10];
	for (int i = 0; i < 10; i++) {
		cin >> a[i];
	}
	
	sort(a,a+10,greater<int>());

	for (int i = 0; i < 3; i++) {
		cout << a[i]<<endl;
	}

	int ans = 0;
	int a, b,c;
	while(cin>>a>>b) {
		ans = 0;
		c = a + b;

		if ( c==0   ) {
			ans = 1;
		}
		else{
			while (c > 0) {
				c /= 10;
				ans++;
			}
		}
		cout << ans << endl;
	}*/

	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) {
			cout << "YES" << endl;
		} else if (a *a == b * b + c * c) {
			cout << "YES" << endl;
		} else if (a * a + c * c == b * b) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}

	return 0;;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;
int main() {
	int d[3],N;
	scanf("%d",&N);
	for(int i=0;i<N;i++) {
		scanf("%d %d %d",&d[0],&d[1],&d[2]);
		sort(d,d+3);
		printf("%s\n",d[2]*d[2]==d[1]*d[1]+d[0]*d[0]?"YES":"NO");
	}
}

C++: #include <iostream>
#include <math.h>

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	int max_num = max(a, max(b, c));
	int sub1, sub2;
	if (max_num != a) {
		sub1 = a;
		if (max_num != b) sub2 = b;
		else sub2 = c;
	} else if (max_num != b) {
		sub1 = b;
		sub2 = c;
	} 		
	if (pow(max_num, 2) == pow(sub1, 2) + pow(sub2, 2)) f = true;
	if (f) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main() {
	int num, a, b, c;
	cin >> num;
	for (int i=0; i<num; i++) {
		cin >> a >> b >> c;
		solve(a,b,c);
	}
	return 0;
}

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

int main()
{
int T;
scanf("%d",&T);
for(int t=0;t<T;t++){
int edge[3];
scanf("%d %d %d",edge,edge+1,edge+2);
sort(edge,edge+3,greater<int>());
if(edge[0]*edge[0]==edge[1]*edge[1]+edge[2]*edge[2]){
printf("%s\n","YES");
}else{
printf("%s\n","NO");
}
}

return 0;
}

C++: #include <iostream>
using namespace std;
int n;
int main()
{
	cin >> n;
	int i,a[1000],b[1000],c[1000],x[1000],y[1000],z[1000],res[1000];
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		x[i] = a[i];
		if (x[i] < b[i]) {
			y[i] = x[i];
			x[i] = b[i];
		}
		else {
			y[i] = b[i];
		}
		if (x[i] < c[i]) {
			z[i] = y[i];
			y[i] = x[i];
			x[i] = c[i];
		}
		else if (y[i] < c[i]) {
			z[i] = y[i];
			y[i] = c[i];
		}
		else {
			z[i] = c[i];
		}
	}
	for (i = 0; i < n; i++) {
		res[i] = x[i] * x[i] - z[i] * z[i] - y[i] * y[i];
		if (res[i] == 0) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
int ride2(int n){return n*n;}
using namespace std;
int main(){
    int a[3],n;
    cin>>n;
    while(n--){
        for(int i=0;i<3;i++)cin>>a[i];
        sort(a,a+3);
        int judge=ride2(a[2])-ride2(a[0])-ride2(a[1]);
        if(!judge)
            cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }

    return 0;
}

C++: #include<iostream>
#include<math.h>

using namespace std;

int pitagoras(int a,int b,int c){
	if(pow(a,2)+pow(b,2) == pow(c,2))
		return 1;
	if(pow(b,2)+pow(c,2) == pow(a,2))
		return 1;
	if(pow(c,2)+pow(a,2) == pow(b,2))
		return 1;
	return 0;
}
int main(){
	int num,i;
	int a[1000],b[1000],c[1000];
	cin >> num;
	for(i = 0; i < num; i++)
		cin >> a[i] >> b[i] >> c[i];
		for(i = 0; i < num; i++){
			if(pitagoras(a[i],b[i],c[i])==1)
				cout << "YES" << endl;
			if(pitagoras(a[i],b[i],c[i])==0)
				cout << "NO"  << endl;
		}
}

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

int main(void) {
    priority_queue<int, vector<int>, greater<int>> que;
    int num;
    cin >> num;
    for(int r = 0; r < num; r++) {
        int a, b, c;
        cin >> a >> b >> c;
        que.push(a); que.push(b); que.push(c);
        a = que.top(); que.pop(); b = que.top(); que.pop(); c = que.top(); que.pop();
        if(a * a + b * b == c * c) printf("YES\n");
        else printf("NO\n");
    }
    
    return(0);
}

C++: #include <string>
#include <vector>
#include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int x,a[3];
    cin>>x;
    for(int i=1;i<x+1;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])cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}

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

#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;

int N;

int main()
{
	scanf("%d",&N);
	FOR(i,0,N){
		int A [3];
		scanf("%d%d%d",&A [0],&A [1],&A [2]);
		sort(A,A + 3);
		if(A [0] * A [0] + A [1] * A [1] == A [2] * A [2]){
			printf("Yes\n");
		}
		else{
			printf("No\n");
		}
	}

	return 0;
}

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

int N;
int a[3]; 
int b,c,d;

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

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	vector<bool> arr;
	for(int i=0;i<n;i++)
	{
		vector<int> cnt;
		int a,b,c;
		cin>>a>>b>>c;
		cnt.push_back(a);
		cnt.push_back(b);
		cnt.push_back(c);
		sort(cnt.begin(),cnt.end());
		if(sqrt(cnt[0]*cnt[0] + cnt[1]*cnt[1]) == cnt[2])
			arr.push_back(true);
		else
			arr.push_back(false);
	}
	for(int i=0;i<arr.size();i++)
	{
		if(arr[i] == true)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int N, s1, s2, s3;

	while(cin >> N)
	{
		while(N--)
		{
			cin >> s1 >> s2 >> s3;
			if(s1*s1 + s2*s2 == s3*s3 || s1*s1 + s3*s3 == s2*s2 || s3*s3 + s2*s2 == s1*s1)
				cout << "YES\n";
			else
				cout << "NO\n";
		}
	}
	return 0;
}

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+c*c==a*a || c*c+a*a==b*b){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

C++: // aoj-0003.cpp

#include <cstdio>

int main() {
	int i, j;
	int sets, x, y, z;

	// read numbers of data sets
	scanf("%d", &sets);
	
	// read data set
	for (i=0; i<sets; ++i) {
		scanf("%d %d %d", &x, &y, &z);
		if (((x * x) + (y * y)) == (z * z)) {
			puts("YES");
		} else {
			puts("No");
		}
	}
	
	return 0;
}

C++: #include<stdio.h>

int main()
{
    int n;
    scanf("%d", &n);
    int a, b, c;
    for (; n > 0; n--) {
        scanf("%d", &a);
        scanf("%d", &b);
        scanf("%d", &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");
        }
    }
    return 0;
}