Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

C++: #include<iostream>

using namespace std;


int main(void){
	
	int n;
	int a,b,c;
	cin>>n;
	while(n>0){
		cin>>a>>b>>c;
		if(a+b>c&&a+c>b&&b+c>a){
			
			if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a)
				cout<<"YES"<<endl;
			else{
				cout<<"NO"<<endl;
			}
			
		}
		else{
			cout<<"NO"<<endl;
		}
		
			
		n--;
	}
	
	
	return 0;
}

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

bool isRightTriangleCore(int a, int b, int c)
{
  return a * a + b * b == c * c;
}

bool isRightTriangle(int a, int b, int c)
{
  int ret = false;

  ret |= isRightTriangleCore(a, b, c);
  ret |= isRightTriangleCore(c, a, b);
  ret |= isRightTriangleCore(b, c, a);

  return ret;
}

int main(void)
{
  int n;

  std::cin >> n;

  while (n--) {
    int a, b, c;

    std::cin >> a >> b >> c;

    if (isRightTriangle(a, b, c)) {
      std::cout << "YES" << std::endl;
    }
    else {
      std::cout << "NO" << std::endl;
    }
  }

  return 0;
}

C++: #include <iostream>
    
inline bool isRightTriangle(const u_int a, const u_int b, const u_int c){
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}
    
int main(){
    u_int n;
    std::cin >> n;
       
    for (u_int i = 0; i < n; ++i){
        u_int a, b, c;
        std::cin >> a >> b >> c;
        std::cout << (isRightTriangle(a, b, c) ? "YES" : "NO") << std::endl;
    }
    
    return 0;
}

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

int main(){

	int a[3];

	while(std::cin >> a[0] >> a[1] >> a[2]){
		std::sort(a,a+3);
		if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]){
			std::cout << "Yes" <<  std::endl;
		}
		else{
			std::cout << "No" << std::endl;
		}
	}
}

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

int main(){
	const int N = 1000;
	int n;
	cin>>n;
		int a[N],b[N],c[N];
		for(int i=1;i<=n;i++){
			cin>>a[i]>>b[i]>>c[i];
		}
		for(int i=1;i<=n;i++){
			if(a[i]*a[i] + b[i]*b[i] == c[i]*c[i] || a[i]*a[i] == b[i]*b[i] + c[i]*c[i] || a[i]*a[i] + c[i]*b[i] == b[i]*c[i]){
				cout<<"YES"<<endl;
			}
			else cout<<"NO"<<endl;
		}
	
}

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

int main()
{
	int nNum=0;
	cin>>nNum;
	int nIn[3]={0};
	while(nNum--)
	{
		cin>>nIn[0]>>nIn[1]>>nIn[2];
		int nMax=max(max(nIn[0],nIn[1]),nIn[2]);
		if(nMax==nIn[2])
		{
			swap(nIn[2],nIn[0]);
		}
		else if (nMax==nIn[1])
		{
			swap(nIn[1],nIn[2]);
		}
		if(nIn[0]*nIn[0]==nIn[1]*nIn[1]+nIn[2]*nIn[2])
		{
			cout<<"YES"<<endl;
		}
		else
		{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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

using namespace std;

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

	int a, b, c, i;
	vector<string> res;
	for (i = 0; i < N; i++) {
		cin >> a >> b >> c;

		int aj = a * a;
		int bj = b * b;
		int cj = c * c;

		if (aj < bj) {
			if (bj < cj) {
				if (cj == aj + bj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
			else {
				if (bj == aj + cj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
		}
		else {
			if (aj < cj) {
				if (cj == aj + bj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
			else {
				if (aj == bj + cj) {
					res.push_back("YES");
				}
				else {
					res.push_back("NO");
				}
			}
		}
	}

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

	return 0;
}

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


using namespace std;

bool check(vector<int> n){
	if(n[0]*n[0]+n[1]*n[1]==n[2]*n[2])return true;
	else false;
}

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		vector<int> hoge;
		cin>>a>>b>>c;
		hoge.push_back(a);
		hoge.push_back(b);
		hoge.push_back(c);
		sort(hoge.begin(),hoge.end());
		cout<< ( check(hoge)==true ? "YES" : "NO")<<endl;
	}
	return 0;
}

C++: i;main(a,b,c){for(scanf("%*d"),i=4;i--&&~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&b+c-a&&a+c-b)?"NO":"YES"))a*=a,b*=b,c*=c;}

C++: #include <iostream>
#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[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}

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

using namespace std;

int main(){
	int n;

	cin >> n;
	
	for(int i = 0; i < n; i++){
		int tate,yoko,naname;
		cin >> tate >> yoko >> naname;

		if(tate > naname){
			swap(tate,naname);
		}

		if(yoko > naname){
			swap(yoko,naname);
	}

		if(naname * naname == tate * tate + yoko * yoko)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	return 0;
}

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
int main() {
	double a, b, c;
	std::vector<std::string>v;
	while(std::cin>>a>>b>>c){
		double max = std::max(a, std::max(b, c));
		if (2*max*max==a*a+b*b+c*c ) {
			v.push_back  ("yes");
		}
		else {
			v.push_back  ("no");
		}
	}
	for (double n = 0; n < v.size(); ++n) {
		std::cout << v[n] << std::endl;
	}
	return 0;
}

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

using namespace std;

int main(int argc, char const* argv[])
{
	double a,b,c,n;

	cin >> n;

	for( int i = 0;i < n;i++ ){
		cin >> a >> b >> c;

		if( a == sqrt( b * b + c * c ) || b == sqrt( a * a + c * c ) || c == sqrt( a * a + b * b ) ) cout << "YES" << endl;
		else cout << "NO" << endl;
	}

	return 0;

}

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

void judgement(int a,int b,int c) {
	if (a == b && b == c) {
		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 <iostream>
#include <algorithm>

bool judge_triangle(int j_edge[])
{
    std::sort(j_edge, j_edge + 2); 
    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;
        }
    }   
    return 0;
}