Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

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"
	} else {
		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<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
		x = x*x;
		y = y*y;
		z = z*z;
		if(x>y&&x>z){
			if(x==(z+y))printf("YES\n");
			else printf("NO\n");
		}
		else if(y>z&&y>x){
			if(y==(x+z)) printf("YES\n");
			else printf("NO\n");
		}
		else {
			if(z==(x+y))printf("YES\n");
			else printf("NO\n");
		}
	}
	return 0;
}

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


int main(){
	int i;
	deque<int> nums;

	cin >> i;

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

		nums.push_front(a);
		nums.push_front(b);
		nums.push_front(c);

		sort(nums.begin(), nums.end());

		a = nums[0];
		b = nums[1];
		c = nums[2];

		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 = 0;
	int kazu = 0;
	int b = 0;
	int c = 0;
	for (int i = 0; i < kazu; i++)
	{
		cin >> a;
		cin >> b;
		cin >> c;
		if (a * a + b * b == c * c)
		{
			cout << "YES" << endl;
			return;
		}
		else if (a * a + c * c == b * b)
		{
			cout << "YES" << endl;
			return;
		}
		else if (c * c + b * b == a * a)
		{
			cout << "YES" << endl;
			return;
		}
		else
		{
			cout << "NO" << endl;
			return;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a,b,c,n;
	cin>>n;
	for(int i=1;i<=n; i++){
		cin>>a>>b>>c;
		if(a*a+b*b==c*c){
			cout<<"Yes"<<endl;
		}else{
			cout<<"No"<<endl;
		}
	}

}

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

int main() {
	vector<int> vec(3); int n; cin >> n;
	auto f_pow = [](int& temp) { temp = pow(temp, 2); };
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 3; j++) cin >> vec[j];
		sort(vec.begin(), vec.end());
		for_each(vec.begin(), vec.end(), f_pow);
		if (vec[0] + vec[1] == vec[2]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
		x = x^2;
		y = y^2;
		z = z^2;
			if((x+y)==z||(x+z)==y||(y+z)==x){
				printf("Yes\n");
			}
			else {
				printf("No\n");
			}
		}
	return 0;
}

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

int main(){
	int a[3], b;
	cin >> b;
	for(int i = 0;i<b;i++){
		cin >> a[0] >> a[1] >> a[2];

		sort(a,a + 3);
		b = pow(a[1],2) + pow(a[0],2);
		if (pow(a[2],2) == b){
			cout << "YES";
		}
		else{
			cout << "NO";
		}
		cout << endl;
	}
}

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a, b, c, n;
  cin >> n;
  for(int i = 0;i < n;i++){
    cin >> a >> b >> c;
    if(b + c > a && a * a == b * b + c * c) cout << "YES\n";
    else if(a + c > b && b * b == a * a + c * c) cout << "YES\n";
    else if(a + b > c && c * c == a * a + b * b) cout << "YES\n";
    else cout << "NO\n"; 
  }

  return 0;
}

C++: #include"iostream"

using namespace std;

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

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

C++: #include <stdio.h>
int main()
{
  int a,b,c,sum,i,n;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d",&a,&b,&c);
    a=a*a;
    b=b*b;
    c=c*c;
    sum=a+b+c;
    if(sum/2==a||sum/2==b||sum/2==c)printf("Yes\n");
    else printf("No\n");
  }
  return 0;
}

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

class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*a+b*b) ans=1;
else ans=0;
};

void print(){
if(ans==0)
cout <<"NO"<< endl;
if(ans==1)
cout <<"YES"<< endl;
}

protected:
int a,b,c,ans;
};

int main(){
int num,a,b,c;
	Triangle *tri /* = Triangle[1000]*/;
	cin >> num;
	tri = new Triangle[num]/*(a,b,c)*/;
	for(int n=0;n<num;n++){
	cin >> a;
	cin >> b;
	cin >> c;
	tri[n].push(a,b,c);
	}
for(int n=0;n<num;n++){
tri[n].checkRight();
tri[n].print();
}
return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  while(scanf("%d %d %d",&a,&b,&c)!=EOF){
    if(a*a+b*b==c*c) printf("YES\n");
    else if(a*a+c*c==b*b) printf("YES\n");
    else if(b*b+c*c==a*a) printf("YES\n");
    else printf("NO\n");
  }
  return 0;
}

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

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

	for(int i = 1, a, b, c; i <= T; i++){
		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 <iostream>
#include <algorithm>

using namespace std;
 
int main() {
 int kaisu;
 int x,y,z;
 int kekka;

 cin >> kaisu;

 for(int i = 1; i <= kaisu; i++){
 cin >> x >> y >> z;
 int array[3];
 array[0] = x;
 array[1] = y;
 array[2] = z;
 if( array[0] < array[1] ){
 swap(array[0],array[1]);
 }
 if( array[0] < array[2] ){
 swap(array[0],array[2]);
 }
 if( array[1] < array[2] ){
 swap(array[1],array[2]);
 }

 if ((array[1]*array[1]+array[2]*array[2]) == array[0]*array[0]){
 cout << "YES"<<endl;
 }
 else {
 cout << "NO" << endl;
 }

 }
 
return 0;
 }

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


using namespace std;

bool isTri(int a, int b, int c){
  if(max(a, b) < c){
    if(pow(c, 2.0) == pow(a, 2.0) + pow(b, 2.0)){
      return true;
    }
  }else{
    if(pow(max(a, b), 2.0) == pow(min(a, b), 2.0) + pow(c, 2.0)){
      return true;
    }
  }
  return false;
}


int main(){
  int a, b, c;
  int num;
  cin >> num;
  
  while(cin >> a >> b >> c){
    if(isTri(a, b, c)){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
    
}