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

int main()
{
	int top;
	int a, b, c;
	int N;

	cin >> N;

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

		cin >> a >> b >> c;

		if (a > b)
			top = a;
		else top = b;

		if (c > top)
			top = c;

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

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

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

int main(){
    int n;
    scanf("%d", &n);
    int sides[3];
    for (int i = 0; i < n; i++){
	cin >> sides[0] >> sides[1] >> sides[2];
	sort(sides, sides+3);
	printf("%s", (sides[0]^2 + sides[1]^2 == sides[2]^2)? "YES" : "NO");
    }
}

C++: #Include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    vector<vector<int>> triangles;
    
    int n;
    cin >> n;
    
    REP(i, 0, n) {
        vector<int> tmp;
        int a, b, c;
        cin >> a >> b >> c;
        tmp.push_back(a);
        tmp.push_back(b);
        tmp.push_back(c);
        
        sort(tmp.begin(), tmp.end());
        triangles.push_back(tmp);
    }

    for(auto sides : triangles) {
        if (sides[2] * sides[2] == sides[0]*sides[0]+sides[1]*sides[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
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 <iostream>
#include <vector>
#include <algorithm>

#define ALL(a) a.begin(),a.end()

using namespace std;

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

  for ( int i = 0; i < n; i++ ) {
    vector<int> v;
    int t;
    for ( int j = 0; j < 3; j++ ) {
      cin >> t;
      v.push_back( t );
    }
    sort(ALL(v));

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

  return 0;
}

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

C++: //AOJ0003 Is it a Right Triangle?
#include <stdio.h>

int main(){
	int i,num[3],line;
	scanf("%d",&line);
	for(i = 0; i < line; i++){
		if(scanf("%d %d %d",&num[0],&num[1],&num[2]) == EOF)break;
		if((num[0]*num[0] == num[1]*num[1]+num[2]*num[2])
			|| (num[1]*num[1] == num[0]*num[0]+num[2]*num[2])
			|| (num[2]*num[2] == num[0]*num[0]+num[1]*num[1]))
			printf("YES\n");
		else printf("NO\n");
		num[0]=0;num[1]=0;num[2]=0;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
long long a, b, c, d;
int main(){
	cin>>a;
	for(int i=0;i<a;i++){
		cin>>b>>c>>d;
		
		if(b>c&&b>d){
			if(((d*d)+(c*c))==(b*b))	
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
		else if(d>c&&d>b){
			if(((b*b)+(c*c))==(d*d))	
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
		else if(c>d&&c>b){
			if(((d*d)+(b*b))==(c*c))	
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
		else
			cout<<"NO"<<endl;
	}
}

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

using namespace std;

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

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

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

int main()
{
	int n, a, b, c;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a >> b >> c;
		int m = max(a, max(b, c));
		int l = min(a, b);
		int n = min(b, c);
		if (l == n) {
			n = min(a, c);
		}
		if (m*m == n*n + l*l) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
    return 0;
}

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

C++: #include <iostream>

int triangle(int x, int y, int z)
{
	int a = x * x;
	int b = y * y;
	int c = z * z;
	return (a + b - c) * (b + c - a) * (c + a - b);
}

int main()
{
	int N, x, y, z;
	
	std::cin >> N;
	
	for(int i = 0; i < N; i++){
		std::cin >> x >> y >> z;
		if ( triangle(x, y, z) == 0 ){
			std::cout << "YES" << std::endl;
		} else {
			std::cout << "NO" << std::endl;
		}
	}
	
	return 0;
}

C++: #include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(void)
{
  int a[3];
  int i;
  int n;

  cin>>n;

  for(i=0;i<n;i++)
    {
      cin>>a[0]>>a[1]>>a[2];

      sort(a,a+3);

        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])
          cout<<"YES"<<endl;

        else
          cout<<"NO"<<endl;
    }

}

C++: #include<stdio.h>

void tri(int x, int y, int z)
{
    if((x == y + z) || (y == z + x) || (z == x + y)) {
        printf("YES\n");
    }else {
        printf("NO\n");
    }    
}

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

    scanf("%d", &num);

    for(int i = 0; i < num; i++) {
        scanf("%d %d %d", &a, &b, &c);
        tri(a*a, b*b, c*c);
    }

    return 0;
}

C++: #include<iostream>

bool right_triangle(int a,int b,int c)
{
    if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) {
        return true;
    }else{
        return false;
    }   
}

int main()
{
    int x,y,z,N;
    std::cin >> N;
    for (int i = 0; i < N; i++) {
        std::cin >> x >> y >> z;
        if (right_triangle(x,y,z)) {
            std::cout << "Yes" << std::endl;
        }else if (right_triangle(x,y,z) == 0 ) { 
            std::cout << "No" << std::endl;
        }
    }   
                                                            1,1          ??????

C++: #include<iostream>
int main(){int ts,x,y,z;std::cin>>ts;for(;ts--;std::cout<<(x+y-z&&y+z-x&&z+x-y?"NO\n":"YES\n"))std::cin>>x>>y>>z,x*=x,y*=y,z*=z;}