Go: package main

import "fmt"

func main() {
	var n int

	fmt.Scanf("%d", &n)

	var a, b, c int
	for i := 0; i < n; i++ {
		var isTriangle bool
		fmt.Scanf("%d %d %d", &a, &b, &c)

		if a*a == b*b+c*c || b*b == a*a+c*c || c*c == b*b+a*a {
			isTriangle = true
		}

		if isTriangle == true {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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;}

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;
}