Go: package main

import (
  "fmt"
)


func main() {
  var a int
  var b int
  var c int
  var n int
  fmt.Scan(&n)
  for _, err := fmt.Scan(&a, &b, &c); err == nil; _, err = fmt.Scan(&a, &b, &c) {
    if a*a == b*b+c*c {
      fmt.Println("YES")
    } else if b*b == c*c+a*a {
      fmt.Println("YES")
    } else if c*c == a*a+b*b {
      fmt.Println("YES")
    } else {
      fmt.Println("NO")
    }
  }
}

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

C++: #include <stdio.h>

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

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

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

bool is_triangle(int a, int b, int c) {
  return (std::pow(a, 2) == (std::pow(b, 2) + std::pow(c, 2)));
}

int main(void) {
  int n = 0;
  
  int a = 0;
  int b = 0;
  int c = 0;

  std::cin >> n;

  for (int i = 0; i < n; i++) {
    std::cin >> a;
    std::cin >> b;
    std::cin >> c;

    bool triangle = is_triangle(a, b, c) || is_triangle(b, c, a) || is_triangle(c, a, b);

    if (triangle) {
      std::cout << "YES" << std::endl;
    } else {
      std::cout << "NO" << std::endl;
    }
  }
   
  return 0;
}

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

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()

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

    REP(i, n) {
        vector<int> v(3);
        REP(j, 3) {
            cin >> v[j];
        }
        sort(ALL(v));
        if (pow(v[0],2)+pow(v[1],2)==pow(v[2],2)) cout << "YES" << endl;
        else cout << "NO" << endl; 
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define MOD (int) (1e9+7)
#define INF (int) 2e9

int main(){
    int n;
    cin >> n;
    rep(i, n){
        int a[3];
        rep(i, 3){
            cin >> a[i];
        }
        sort(a, a+3);

        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    // printf("%d\n", N);
    return 0;
}

C++: #include<iostream>
#include<vector>
#include<math.h>

using namespace std;

int maxnum(int f, int s, int t) {

   if (f >= s && f >= t) {

      return 0;

   }
   else if (s >= f && s >= t) {

      return 1;

   }
   else {

      return 2;

   }

}

bool solve() {

   int n;
   int set[1000][3];
   bool f;

   cin >> n;

   for (long i = 0; i<n; i++) {

      for (long j = 0; j < 3; j++) {

         cin >> set[i][j];

      }

   }

   for (long i = 0; i < n; i++) {

      f = (pow(set[i][0], 2) == (pow(set[i][1], 2) + pow(set[i][2], 2)) || pow(set[i][1], 2) == (pow(set[i][0], 2) + pow(set[i][2], 2)) || pow(set[i][2], 2) == (pow(set[i][0], 2) + pow(set[i][1], 2)));
      f ? cout << "YES\n" : cout << "NO\n";
   }

   return 0;
}

int main() {

   return solve();

}

C++: #include<stdio.h>
int main(void)
{
	int n,a,b,c,i,l;
	l=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
	if(a<c&&b<c){
		if(a*a+b*b==c*c){
			printf("YES\n");
			l=1;
		}
	}
		if(a<b&&c<b){
		if(a*a+c*c==b*b){
			printf("YES\n");
			l=1;
		}
	}
		if(b<a&&c<a){
		if(c*c+b*b==a*a){
			printf("YES\n");
			l=1;
		}
	}
	else if(l==0){
	printf("NO\n");
	}
	}
	return 0;
}

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

int main(){
    
    int a[3];
    int N;
    int i,j,k,tmp;
    
    cin>>N;
    for(k=0;k<N;k++){
        cin>>a[0]>>a[1]>>a[2];
        for(i=0;i<2;i++){
            for(j=i+1;j<3;j++){
                if(a[j]>a[i]){
                    tmp=a[i];
                    a[i]=a[j];
                    a[j]=tmp;
                }
            }
            
            
        }
        
        if(pow(a[0],2)==pow(a[1],2)+pow(a[2],2)){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    
    }

}

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

int n;
int edge[3];

int main() {
	std::cin >> n;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < 3; ++j)
			std::cin >> edge[j];
		std::sort(edge, edge + 3);
		if (pow(edge[2],2)==pow(edge[1],2)+pow(edge[0],2))
			std::cout << "YES" << std::endl;
		else
			std::cout << "NO" << std::endl;
	}
		return 0;
}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int main() {
	int N; cin >> N;
	while (N--) {
		int a, b, c; cin >> a >> b >> c;
		if (a > b)swap(a, b);
		if (b > c)swap(c, b);
		if (a + b > c)cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
struct length
{
	int a;
	int b;
	int c;
};
int main()
{
	int n,i;
	cin>>n;
	length *p=new length [n];
	for(i=0;i<n;i++)
		cin>>p[i].a>>p[i].b>>p[i].c;
	for(i=0;i<n;i++)
		if((p[i].a * p[i].a == p[i].b * p[i].b + p[i].c * p[i].c)||(p[i].a * p[i].a == p[i].b * p[i].b - p[i].c * p[i].c)||(p[i].a * p[i].a + p[i].b * p[i].b == p[i].c * p[i].c))
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	return 0;
}

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

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

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

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

bool judgeRectTriangle(int, int, int);

int main(void)
{
    int edge1, edge2, edge3;

    scanf("%d", &edge1);//最初のデータを捨てます。

    while (scanf("%d%d%d", &edge1, &edge2, &edge3) != EOF) {
        if (judgeRectTriangle(edge1, edge2, edge3)) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    
    return 0;
}

bool judgeRectTriangle(int x, int y, int z)
{
    if (x * x + y * y == z * z || y * y + z * z == x * x || z * z + x * x == y * y) {
        return true;
    } else {
        return false;
    }
}

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

int main() {

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

    cin >> a >> b >> c;

    bool flag = false;
    for ( int j = 0; j < 3; j++ ) {

      if ( a*a == b*b + c*c && a < b+c ) {
	flag = true;
	break;
      }

      k = a;
      a = b;
      b = c;
      c = k;

    }

    if ( flag ) {
      cout << "YES" << endl;
    }else {
      cout << "NO" << endl;
    }

  }

  return 0;

}