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 <stdio.h>
using namespace std;

int main(){
  int N, a, b, c, t;
  scanf("%d", &N);
  for(int i=0;i<N;i++){
    scanf("%d %d %d", &a, &b, &c);
    if(a<b){
      t=a; a=b; b=t;
    }
    if(a<c){
      t=a; a=c; c=t;
    }
    if(a*a == b*b + c*c) printf("YES");
    else printf("NO");
    printf("\n");
  }
  return 0;
}

C++: #include <cstdio>

long maks(long a, long b, long c);

int main() {
    int t;
    scanf("%d", &t);
    for (;t > 0; t--) {
        long a, b, c;
        scanf("%d %d %d", &a, &b, &c);
        a = a*a;
        b = b*b;
        c = c*c;
        if ( maks(a, b, c) == (a + b + c - maks(a, b, c))) {
             printf("YES\n");
        } else printf("NO\n");
    }
    return 0;
}

long maks(long a, long b, long c) {
     if ((a > b)&&(a > c)) {return a;}
     else if ((b > a)&&(b > c)) {return b;}
     else {return c;}
}

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

C++: #include <stdio.h>
#include<string>
#include<string.h>
#include <math.h>
#include<iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace  std;

void init()
{


#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}

#define foreach(i,n) for(i=0;i<n;++i)
#define foreachd(i,n) for(int i=0;i<n;++i)
#define printfInt1(n) printf("%d\n",n)
#define scanfInt1(n) scanf("%d",&n)
#define scanfInt2(a,b) scanf("%d%d", &a, &b)
#define scanfInt3(a,b,c) scanf("%d%d%d", &a, &b, &c)

class Geometry
{
public:
	//譏ッ蜷ヲ蜿ッ莉・譫??荳芽ァ貞ス「
	static bool CanConstructTriangle(int a, int b,int c)
	{
		return a+b<=c && a+c<=b && b+c<<a;
	}
};


void func()
{
	int t;
	while(t--)
	{
		int a,b,c;
		scanfInt3(a,b,c);
		puts(Geometry::CanConstructTriangle(a,b,c)?"YES": "NO");
	}
}

C++: #include<iostream>
using namespace std;
int i,j,d,k,n1,n2,n3,temp;
 int l[3];

int rt()
{
//入力
cin >> n1 >> n2 >> n3;
while(n1 < 1 or n1 > 1000 or n2 < 1 or n2 >1000 or n3 < 1 or n3 > 1000){
cin >> n1 >> n2 >> n3;
}
if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[0]=n1;
       l[1]=n2;
       l[2]=n3;
        for (i = 0; i < 2; i++) {
        for (j = 2; j > i; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[j];  
                l[j] = l[j - 1];
                l[j - 1] = temp;
            }
        }
    }
 }
    if(l[2]*l[2] == (l[1]*l[1]+l[0]*l[0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}



int main(){

   cin >> d;
   while(d < 1 or d > 1000){
       cin >> d;
   }

for(k=0;k<d;k++){
    rt();
}

    return 0;
}

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

int main()
{
	int n, a[3];
	cin >> n;
	for (int i=0; i<n; ++i) {
		for (int j=0; j<3; ++j) {
			cin >> a[j];
		}
		sort(a, a+3);
		cout << (a[2]*a[2] == a[0]*a[0] + a[1]*a[1] ? "YES" : "NO") << '\n';
	}
}

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

int main() {
	int n;
	int length[3];
	int temp;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> length[0] >> length[1] >> length[2];
		if(length[0] <= length[1]){
			temp = length[0];
			length[0] = length[1];
			length[1] = temp;
		}
		if(length[0] <= length[2]){
			temp = length[0];
			length[0] = length[2];
			length[2] = temp;
		}
		if(length[0]*length[0] == length[1]*length[1] + length[2]*length[2]){
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include "bits/stdc++.h"
using namespace std;
int main(){
    int N; cin >> N;
    for(int i=0; i<N; i++){
        int a, b, c;
        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<cstdio>
#include<algorithm>

using namespace std;

int N;
int Side[3];

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

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

int main() {
  unsigned int n,a,b,c;
  std::cin >> n;
  for(unsigned int i=0;i<n;i++) {
    scanf("%d %d %d", &a, &b, &c); 
    std::vector<unsigned int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    sort(v.begin(),v.end());
    if((a*a)+(b*b)==(c*c)) {
      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;
	for(int i=0;i<n;i++){
	cin>>a>>b>>c;
	if(a*a==b*b+c*c){
		cout<<"YES"<<endl;
	}
		if(b*b==a*a+c*c){
		cout<<"YES"<<endl;
	}
		if(c*c==b*b+a*a){
		cout<<"YES"<<endl;
	}
	else{
		cout<<"NO"<<endl;
	}
	}
}

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

using namespace std;

int main(){
  int n;
  vector<int> a(3);
  cin >> n;

  while(n--){
    int MAX;
    
    cin >> a[0] >> a[1] >> a[2];
    a[0] *= a[0];
    a[1] *= a[1];
    a[2] *= a[2];
    MAX = max(a[0], max(a[1], a[2]));
        
    if(MAX == accumulate(a.begin(), a.end(), 0) - MAX){
      cout << "YES" << endl;
    }
    else{
      cout << "NO" << endl;
    }
  }
  
  return 0;
}

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

int main() {
  int n, a[3];
  cin >> n;
  while (n--) {
    for (auto& e : a) cin >> e;
    sort(a, a + 3);
    bool f = a[0] * a[0] + a[1] * a[1] == a[2] * a[2];
    if (f) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}

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

C++: #include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int main(void){
	int a;
	int b;
	int n;
	int c;

	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		scanf("%d %d %d", &a, &b, &c);
		a = a*a;
		b = b*b;
		c = c*c;
		if (a + b == c || b + c == a || c + a == b){
			printf("YES\n");
		}
		else printf("NO\n");
	}

		return 0;
	}

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

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

#define REP(i, s, n) for(int i = s; i < n; ++i)
#define rep(i, n)		 REP(i, 0, n)
#define SORT(c)			 sort((c).begin(), (c).end())
#define IINF					INT_MAX
#define LLINF					LLONG_MAX
#define DEBUG					false

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