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 <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
int n;
using namespace std;
int main(){
	std::ios::sync_with_stdio(false);
	

	cin>>n;
	for(int i=0;i<n;i++){
		priority_queue <int > dp;
		for(int i=0;i<3;i++){
			int k;
			cin>>k;
			dp.push(k);
		}
		int a=dp.top();dp.pop();
		int b=dp.top();dp.pop();
		int c=dp.top();dp.pop();
		if(a*a==((b*b)+(c*c))){
			cout<<"YES\n";
		}else{
			cout<<"NO\n";
		}
	}
	return 0;
}

C++: #include<iostream>
int main(){
	using namespace std;
	int j,n,leng[1000];
	cin>>n;
	for(int i=0;i<n;++i){
		cin>>leng[3*i]>>leng[(3*i)+1]>>leng[(3*i)+2];
		for(int a=0;a<3;++a)
        for(int b=a+1;b<3;++b)
            if(leng[(3*i)+a]>leng[(3*i)+b])j=leng[(3*i)+a],leng[(3*i)+a]=leng[(3*i)+b],leng[(3*i)+b]=j;

	}

	for(int i=0;i<n;++i){
		if((leng[3*i]^2)+(leng[(3*i)+1]^2) == (leng[(3*i)+2]^2))cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	
	return 0;
}

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

#define MAX 256

int main(void){
	
	int n, a, b, c;

	scanf("%d", &n);
	int ans[n];

	for (int i = 0; i < n; i++){
		scanf("%d%d%d", &a, &b, &c);
		if (a > b){
			int d = a;
			a = b;
			b = d;
		}
		if (c < a){
			int d = a;
			a = c;
			c = b;
			b = d;
		}
		else if (c > a&&c < b){
			int d = b;
			b = c;
			c = d;
		}
		if (a*a + b*b == c*c){
			ans[i] = 1;
		}
		else{
			ans[i] = 0;
		}
	}

	for (int i = 0; i < n; i++){
		if (ans[i] == 1)printf("YES\n");
		if (ans[i] == 0)printf("NO\n");
	}

	return 0;
}

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

using namespace std;

int main(void){
  int n,array[3],i,temp;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d%d%d",&array[0],&array[1],&array[2]);
    sort(array,array+3);
    if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2])  printf("Yes\n");
    else  printf("No\n");
  }

  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <bitset>
#include <set>
#include <queue>

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,b,n) for(int i=b;i<n;i++)

const float PI = 3.1415926;
static const int INFTY = (1<<30);

using namespace std;

typedef long long ll;
typedef long double ld;

int n, a, b, c;

int main() {
  cin >> n;
  rep(i,n){
    cin >> a >> b >> c;
    int tmp = max(max(a,b),c);
    if(a == tmp) a=c;
    if(b == tmp) b=c;
    if(a*a + b*b == tmp*tmp)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }

  return 0;
}

C++: #include <stdio.h>

void swap(int &a,int &b){
	int tmp=a ; a=b ; b = tmp; 
}
int main(){
	int array[3];
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
    for(int i=0; i<3; i++) scanf("%d",&array[i]);
    for(int i=0; i<3; i++) for(int j=0; j<2; j++) if(array[j]>array[j+1]) {
        swap(array[j],array[j+1]); 
        
    }
	if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2]){
		printf("YES\n");
	}else{
		printf("NO\n");
	}
	}
    return 0;
}

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

int main(){
	const int N = 1000;
	int n,a[N],b[N],c[N];
	cin>>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 <stdio.h>
#include <math.h>
int trianglechecker(int x, int y, int z);
int main(void){
    int loop, len1, len2, len3;
    int f = 0;
    scanf("%d", &loop);
    for(int i = 0; i < loop; i++)
    {
        scanf("%d%d%d", &len1, &len2, &len3);
        f = trianglechecker(len1, len2, len3);
        if(f == 1)
        {
            printf("YES\n");
        }
        if(f == 0)
        {
            printf("NO\n");
        }
    }
    return 0;
}
int trianglechecker(int x, int y, int z)
{
    if(x * x == y * y + z * z){
        return 1;
    }
    if(y * y == x * x + z * z){
        return 1;
    }
    if(z * z == y * y + x * x){
        return 1;
    }
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

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

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

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

#define rep(i,n) for(int i=0; i<n; i++)
int main(){
	int N, a, b, c;
	cin >> N;
	rep(i,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;
	}

    return 0;
}

C++: #include <stdio.h>

int aaa(int a, int b, int c){
	if(a*a+b*b==c*c){
		return 1;
	}
	return 0;
}

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

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

int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int _a, _b, _c;
    cin >> _a >> _b >> _c;
    int a = max(_a, max(_b, _c)), b, c;
    if (a == _a) {
      b = _b;
      c = _c;
    } else if (a == _b) {
      b = _a;
      c = _c;
    } else if (a == _c) {
      b = _b;
      c = _a;
    }
    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 n;
	int a, b, c;
	for(cin>>n; n>0; --n) {
		cin>>a>>b>>c;
		
		int p;
		if(a>b) {
			p=a;
			a=b;
			b=p;
		}

		if(b>c) {
			p=b;
			b=c;
			c=p;
		}
		if(a>b) {
			p=a;
			a=b;
			b=p;
		}

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

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

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

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

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  vector<int> edge(3);
  scanf("%d",&n);
  for(int i=0;i<n;++i){
    scanf("%d %d %d",&edge[0],&edge[1],&edge[2]);
    sort(edge.begin(),edge.end());
    printf("%s\n",edge[0]*edge[0]+edge[1]*edge[1]==edge[2]*edge[2] ? "YES" : "NO");
  }
  return 0;
}