Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  long long n,a,b,c;
  cin >> n;
  long long tmp[3];
  for(int i=0;i<n;i++){
    cin >> a >> b >> c;
    tmp[0]=a;tmp[1]=b;tmp[2]=c;
    sort(tmp,tmp+3);
    if(tmp[0]*tmp[0]+tmp[1]*tmp[1]==tmp[2]*tmp[2]){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
  return 0;
}

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

using namespace std;

int main() {
    int n; scanf("%d", &n);
    
    for(int i = 0; i < n; ++i) {
    	int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]);
    	
    	sort(s, s + 3);
    	
    	int a=s[0], b=s[1], c=s[2];
    	
    	if (c*c == (a+b)*(a+b)) puts("YES");
    	else puts("NO");
    }
}

C++: #include <iostream>

bool is_right_triangle(u_int a, u_int b, u_int c) {
    return ((a*a == b*b + c*c) || (b*b == c*c + a*a) || (c*c == a*a + b*b));
}

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

    std::cin >> n;
    while (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<queue>
using namespace std;

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

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

int main(){
    float a[1000], b[1000], c[1000];
    int n, i;

    cin>>n;
    if(n< 1000){
    for(i=0; i<n; i++){
        cin>>a[i]>>b[i]>>c[i];
    }
    for(i=0; i<n; i++){
        if((b[i] + c[i]) / 2 == a[i] and a[i] != c[i]){
            cout<<endl<<"YES";}
        else{
            cout<<endl<<"NO";
        }
    }}
    return 0;
}

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

C++: #include<stdio.h>
int main(){
  int n;
  int a[3];
  int temp;
  int i,j,k;
  scanf("%d",&n);
  for(k=0;k<n;k++){
    for(i=0;i<3;i++){
      scanf("%d",&a[i]);
    }
    for(i=0;i<2;i++){
      for(j=0;j<2-i;j++){
	if(a[j]<a[j+1]){
	  temp=a[j];
	  a[j]=a[j+1];
	  a[j+1]=temp;
	}
      }
    }
    if(a[0]*a[0]==a[1]*a[1]+a[2]*a[2]){
      printf("YES\n");
    }else{
      printf("NO\n");
    }
  }
  return 0;
}

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

using namespace std;


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

	vector<bool> result(n);

	array<int, 3> triangle;
	for(int i = 0; i < n; i++){
		cin >> triangle[0] >> triangle[1] >> triangle[2];

		sort(begin(triangle), end(triangle), greater<int>());

		const auto square = bind(pow<int, int>, placeholders::_1, 2);
		result[i] = 
			square(triangle[0]) == square(triangle[1]) + square(triangle[2]);
	}

	for(const bool& b : result){
		cout << (b ? "YES" : "NO") << endl;;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][3];
int y = 0;
int temp;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];
}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<5;looper2++)
{
    if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
            if((panjang[looper][y+1]<(panjang[looper][y+2])))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;

    }

    }
}
cout << endl;
}
for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << "YES" << endl;
    else cout << "NO" << endl;
}


}

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[i];
    sort(a,a+3);
    if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}

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

#include <iostream>
#include <vector>
#include <algorithm>

int main() {

  long N;
  long length[3];


  std::cin >> N;

  for(int i = 0; i < N; ++i) {

    std::cin >> length[0] >> length[1] >> length[2];
    std::sort(length, length+3);

    if(length[0]*length[0] + length[1]*length[1] == length[2]*length[2]) {
      std::cout << "Yes" << std::endl;
    }
    else {
      std::cout << "No" << std::endl;
    }

  }

  return 0;

}

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

int main() {
	int n;
	cin >> n;
	int around[3];
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 3; j++) {
			cin >> around[j];
		}
		for (int j = 0; j < 2; j++){
			for (int k = 0; k < 2; k++) {
				if (around[k] < around[k + 1])swap(around[k], around[k + 1]);
			}
		}
		if (around[0] * around[0] == around[1] * around[1] + around[2] * around[2])cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;

int main(){
	int x,y,z,n,a,b;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> x >> y >> z;
		if (x < y){
			a = y;
			y = x;
			x = a;
		}
		if (x < z){
			b = z;
			z = x;
			x = b;
		}
		if (z*z + y*y == x*x){
			cout << "YES" << endl;
		}
		else cout << "NO" << endl;
	}
	
	
	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
	{
		int a, b, c;
		bool _bool = false;
		while (cin >> a >> b >> c)
		{
			if ( a * a ==( b* b + c * c) || b*b == a*a + b*b || c*c == a* a + b* b)
			{
				_bool = true;
			}
			if (_bool)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}
		return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a,b[3]={0};
	cin>>a;
	for (int A=0;A<a;A++){
		cin>>b[0]>>b[1]>>b[2];
		sort(b,b+3);
		b[0]*=b[0];
		b[1]*=b[1];
		b[2]*=b[2];
		if (b[2]!=b[0]+b[1]) cout<<"No"<<endl;
		else cout<<"Yes"<<endl;
	}
	return 0;
}

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

int main() {
    int n; scanf("%d", &n);
    
    for(int i = 0; i < n; ++i) {
    	int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]);
    	
    	sort(s, s + 3);
    	
    	int a=s[0], b=s[1], c=s[2];
    	
    	if (c*c == (a+b)*(a+b)) puts("YES");
    	else puts("NO");
    }
}