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 <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" << endl;
	}
      else
	{
	  cout << "NO" << endl;
	}
    }
}

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

int main(){

	int a,b,c,n;
	cin >> n;

	for(int i=0; i<n;i++){
		while(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;
		}
	}

	int stop;
	cin >> stop;

    return 0;
}

C++: #include <iostream>

bool is_right_triangle(const int a, const int b, const int c)
{
    bool ret;
    int aa;
    int bb;
    int cc;
    
    aa = a * a;
    bb = b * b;
    cc = c * c;
    
    if (aa + bb == cc || bb + cc == aa || cc + aa == bb){
        ret = true;
    }
    else {
        ret = false;
    }
    
    return ret;
}

int main()
{
    int n;
    int a;
    int b;
    int c;
    
    std::cin >> n;
    
    for (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<iostream>
#include<string>
#include<vector>
using namespace std;

int main(){
	int a,b,c;
	int n;
	cin>>n;
	string answer[10000];
	for(int i=0;i<n;i++){
		cin>>a>>b>>c;
		if((a^2)==(b^2)+(c^2)||(b^2)==(c^2)+(a^2)||(c^2)==(a^2)+(b^2)){
			answer[i]="YES";}
		else answer[i]="NO";
	}
	for(int j=0;j<n;j++){
		cout<<answer[j]<<endl;
	}
}

C++: #define D(x) cout << #x " = " << x << endl
#define DD(x, y) cout << "(" #x ", " #y ") = (" << x << ", " << y << ")" << endl
#define DDD(x, y, z) cout << "(" #x ", " #y ", " #z ") = (" << x << ", " << y << ", " << z << ")" << endl
#define DV(v) for (auto __macro_vi : v){ cout << __macro_vi << " ";} cout << endl;
#define DA(a, n) for (int __macro_i = 0; __macro_i < n; ++__macro_i) { cout << a[__macro_i] << " "; } cout << endl;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define ALL(v) (v).begin(), (v).end()
#include<iostream>
#include<vector>
#include<cassert>
#include<cmath>
#include<algorithm>

using namespace std;
int t[3];
int n;
int main()
{
    cin >> n;
    for(int i = 0; i < n; ++i) {
        for(int k = 0; k < 3; ++k) {
            cin >> t[k];
        }
        sort(t, t + 3);
        cout << ((t[2] * t[2] == t[0] * t[0] + t[1] * t[1]) ? "YES" : "NO") << endl;
    }
}

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

int main(void) {
    int a, b, c;
    
    while(cin >> a >> b >> c) {
        if(a*a + b*b == c*c) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

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>
int main(){int t,x,y,z;for(std::cin>>t;t--;printf(x+y-z&&y+z-x&&z+x-y?"NO\n":"YES\n"))std::cin>>x>>y>>z,x*=x,y*=y,z*=z;}

C++: #include <stdio.h>

void right_triangle(int a, int b, int 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");
    }
}

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);
        right_triangle(a, b, c);
    }    
    return 0;
}

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

using namespace std;

int main() {
	int caso;
	int lado_1, lado_2, lado_3;
	
	vector<int> triangle;
	
	cin >> caso;
	
	for(int index = 0; index < caso; ++index) {
		
		triangle.clear();
		
		cin >> lado_1 >> lado_2 >> lado_3;
		triangle.push_back(lado_1);
		triangle.push_back(lado_2);
		triangle.push_back(lado_3);
	
		sort(triangle.begin(), triangle.end());
		
		if( pow(triangle[0], 2) + pow(triangle[1], 2) == pow(triangle[2], 2) )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	
	return 0;
}

C++: #include <stdio.h>

int main(){

	int N = 0, a, b, c,i;

	scanf("%d",&N);
	for (i = 0; i < N;i++)
	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<iostream>
using namespace std;
int main(){
  int a[10000],b[10000],c[10000],n;
  cin>>n;
  for(int i=0;i<n;i++){
  cin>>a[i]>>b[i]>>c[i];
  a[i]*=a[i];
  b[i]*=b[i];
  c[i]*=c[i];
  }
  for(int i=0;i<n;i++){
  if(a[i]+b[i]==c[i]||a[i]+c[i]==b[i]||b[i]+c[i]==a[i]){
    cout<<"YES"<<endl;
  }else{
    cout<<"NO"<<endl;
  }
  }
  return(0);
}

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

bool isTriangle(int a, int b, int c);

int main(){
	int a, b, c, count;
	bool check;
	
	std::cin >> count;
	
	for(int i = 0; i < count; ++i){
		std::cin >> a >> b >> c;
		
		int max_num = std::max({a, b, c});
		if(max_num == a) check = isTriangle(b, c, a);
		else if(max_num == b) check = isTriangle(a, c, b);
		else if(max_num == c) check = isTriangle(a, b, c);
		
		if(check) std::cout << "YES" << std::endl;
		else std::cout << "NO" << std::endl;
	}
	
	return 0;
}

bool isTriangle(int a, int b, int c){
	if(std::pow(a, 2) + std::pow(b, 2) == std::pow(c, 2)) return true;
	else return false;
}

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

#define upper 1000
#define lower 1
#define eN 1000

using namespace std;


void swap(int& e1, int& e2, int& e3){
	if (e1 > e2){
		int tmp = e1;
		e1 = e2;
		e2 = tmp;
	}
	if (e2 > e3){
		int tmp = e2;
		e2 = e3;
		e3 = tmp;
	}
	if (e1 > e3){
		int tmp = e1;
		e1 = e3;
		e3 = tmp;
	}
}

bool check(int e1, int e2, int e3){
	if (((e1*e1)+(e2*e2)) == (e3*e3)){
		return true;
	}
	else{
		false;
	}
}

int main(void){
	int N = 1;
	cin >> N;
	//vector<bool> arr;

	for (int i=0; i<N; ++i){
		int e1, e2, e3;
		cin >> e1 >> e2 >> e3;
		swap(e1,e2,e3);
		if (check(e1, e2, e3)==true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
		//arr.push_back(check(e1,e2,e3));
	}
	/*for (int i=0; i<N; ++i){
		if (arr[i] == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}*/
	return 0;
}

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<stdio.h>
using namespace std;
int main(){
  int a,b,c;
  int n;
  int i;
  cin>>n;
  for(i=0;i<n;i++){
    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;
}