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 <bits/stdc++.h>
using namespace std;

#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;

int N;

int main()
{
	scanf("%d",&N);
	FOR(i,0,N){
		int A [3];
		scanf("%d%d%d",&A [0],&A [1],&A [2]);
		sort(A,A + 3);
		if(A [0] + A [1] > A [2] && A [0] * A [0] + A [1] * A [1] == A [2] * A [2]){
			printf("Yes\n");
		}
		else{
			printf("No\n");
		}
	}

	return 0;
}

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

int main(){
    
	int i, a, b, c;
    int ab=0, bc=0, ca=0;
    
	cin >> i;
    
	while(i-- > 0){
        
		cin>> a>> b>> c;
        
        ab = a*a+b*b;
        bc = b*b+c*c;
        ca = c*c+a*a;
		
		if(ab == c*c || bc==a*a || ca==b*b) cout << "YES" << endl;
		else cout << "NO" << endl;
        
	}
    
    
	return 0;
}

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

int a,testcase;
int input[3];

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

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

int main()
{
	vector<int> v(3);
	int T;
	
	cin >> T;
	for(int t=0; t<T; t++)
	{
		cin >> v[0] >> v[1] >> v[2];
		std::sort(v.begin(), v.end());

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

C++: #include <stdio.h>
int main(){
	int a[3];
	int tmp = 0;
	int n = 0;
	scanf("%d",&n);
	
	for(int i = 0; i < n; i++){
		scanf("%d %d %d",&a[0],&a[1],&a[2]);
		
		if(a[0] > a[1]){
			tmp = a[0];
			a[0] = a[1];
			a[1] = tmp;
		}
		if(a[1] > a[2]){
			tmp = a[1];
			a[1] = a[2];
			a[2] = tmp;
		}
		if(a[0] > a[1]){
			tmp = a[0];
			a[0] = a[1];
			a[1] = tmp;
		}

		if(a[2] * a[2] == a[0] * a[0] + a[1] * a[1]){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}

	}
	return 0;
}

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

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

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

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

	while(n--){
		int a,b,c;
		cin>>a>>b>>c;
		a *= a;
		b *= b;
		c *= c;
		cout<<(a+b==c || a+c==b || b+c==a ? "YES" : "NO")<<endl;
	}

	return 0;
}

C++: #include<iostream>

int main(){
	int a,b,c;
	while(std::cin>>a>>b>>c){
	if(a*a+b*b==c*c){
		std::cout<<"YES"<<std::endl;
	}else if(a*a+c*c==b*b){
		std::cout<<"YES"<<std::endl;
	}else if(b*b+c*c==a*a){
		std::cout<<"YES"<<std::endl;
	}else{
		std::cout<<"NO"<<std::endl;
	}
}
	return 0;
}

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


string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(1<=x || x<=1000 || ceil(x) == floor(x))
        return false;
    else
        return true;
}

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            
            break;
        }
        
        else{
            x[N-1] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

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

int main(){
    int times;
    cin >> times;

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

        double a2, b2, c2;
        a2 = pow(a,2);
        b2 = pow(b,2);
        c2 = pow(c,2);

        if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

int main() {
	int a, b, c, num;

	cin >> num;

	int* bat = new int[ num * 3 ];

	for( int i = 0; i < num; ++i ) {
		cin >> bat[ i*3 + 0 ] >> bat[ i*3 + 1 ] >> bat[ i*3 + 2 ];
	}

	for( int i = 0; i < num; ++i ) {
		a = bat[ i*3 + 0 ];
		b = bat[ i*3 + 1 ];
		c = bat[ i*3 + 2 ];
		if ( a < b ) {
			int t = a;
			a = b;
			b = t;
		}
		if ( a < c ) {
			int t = a;
			a = c;
			c = t;
		}
		
		if ( !( a*a - ( b*b + c*c ) ) ) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}

	delete[] bat;
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,n,i;

	scanf("%d",&n);
	
	for(i=0;i<n;i++){
	
		scanf("%d %d %d",&a,&b,&c);

		if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==a*a+b*b){
		printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}

	return 0;
}

C++: #include <iostream>
#include <math.h>
#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]=pow(b[0],2);
		b[1]=pow(b[1],2);
		b[2]=pow(b[2],2);
		if (b[0]==24) b[0]+=1;
		if (b[1]==24) b[1]+=1;
		if (b[2]==24) b[2]+=1;
		if (b[2]!=b[0]+b[1]) cout<<"No"<<endl;
		else cout<<"Yes"<<endl;
	}
	return 0;
}

C++: #include<stdio.h>
#include<math.h>

#define N 1000

struct{int a[3];} d[N];

int main(){
    int i,j,L;
    int longest,small;

    for(i=0; i<N,scanf("%d %d %d",&d[i].a[0],&d[i].a[1],&d[i].a[2])!=EOF; i++);
    L=i;
    for(i=0;i<L;i++){        
        longest=0;
        for(j=0;j<3;j++)
            if(longest<d[i].a[j])
                longest=d[i].a[j];
        for(j=0;j<3;j++)
            if(d[i].a[j]!=longest)
                small+=pow(d[i].a[j],2);
        if(small==pow(longest,2))
            printf("YES");
        else
            printf("NO");
    }
    return 0;
}

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

using namespace std;

int main()
{
	int a; cin >> a;
	int t[3];

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

	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define shosu(n) setprecision(n)
using namespace std;
int main() {
  int A[3], N;
  for (int Q = 0; Q < N; Q++) {
    rep(i, 3) cin >> A[i];
    sort(A, A + 3);
    if (A[0] * A[0] + A[1] * A[1] - A[2] * A[2] == 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}