Go: package main
import (
    "fmt"
    "os"
    "bufio"
    "strconv"
    "sort"
)
 
var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)
 
func main(){
    sc.Split(bufio.ScanWords)
    defer out.Flush()
    n := nextInt()
    for i:=0; i<n; i++{
        data := nextInts(3)
        sort.Ints(data)
        if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
            fmt.Fprintln(out, "YES")
        }else{
            fmt.Fprintln(out, "NO")
        }
    }
}
 
func next() string{
    sc.Scan()
    return sc.Text()
}
 
func nextInt() int{
    a, _ := strconv.Atoi(next())
    return a
}
 
func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <cstdio>

using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;(i)>=0;(i)--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())

typedef long long ll;

int main(){
    
    int N;
    cin>>N;
    
    REP(i,N){
        int a,b,c;
        cin>>a>>b>>c;
        if(a+b>c)cout<<"NO"<<endl;
        else if(a+c>b)cout<<"NO"<<endl;
        else if(b+c>a)cout<<"NO"<<endl;
        else cout<<"YES"<<endl;
    }
    
    return 0;
}

C++: #include<iostream>

using namespace std;

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

  if(a>c){
    tmp=a;
    a=c;
    c=tmp;
  }
  if(b>c){
    tmp=b;
    b=c;
    c=tmp;
  }

  if(a*a+b*b==c*c)
    cin >> YES >> endl;
  else
    cin >> NO >> endl;
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,a,b,c,i,l;
	
	scanf("%d",&n);
	for(i=0;i<n;i++){
	l=0;
		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>

using namespace std;


//辺の長さが、a,b,cも時、三角形ができるかどうかを判定。できる場合はYESを返し、できない場合はNOを返す。
void judge_triangle(int a,int b,int c){
  int max = 0;
  bool flag = false;


  if( a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a == b*b){
    flag = true;
  }

  if(flag == true){
    cout <<"YES\n";
  }else {
    cout <<"NO\n";
  }

}

int main(){
  int data_length;
  int sides_length[] ={ -1,-1,-1};
  int i,j;

  cin >> data_length;

  for(i = 0;i < data_length;i++){
    for(j = 0;j<3;j++){
      cin >> sides_length[j];
      if(j==2){
        judge_triangle(sides_length[0],sides_length[1],sides_length[2]);
      }
    }
  }

  return 0;
}

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

	}
return 0;
}

C++: #include <iostream>
using namespace std;
 
int main()
{
   int a,b,c,x, y, z,n;
 
   // read in n 
   cin>>n;

   // for n set of data, read into 3 sides 
   
   for(int i=1;i<=n;i++)
   {
      cin>>a>>b>>c;          
      x=a*a; y=b*b; z=c*c;
      
      // check if they are triangle
      if(x+y==z||x+z==y||y+z==x)
          cout<<"YES"<<endl;
      else
          cout<<"NO"<<endl;
    }   
    return 0;
}

C++: #include <stdio.h>

int main(){
    int N;
    int a,b,c,d;
    int i;
    scanf("%d",&N);
    for(i=0;i<N;i++){
        scanf("%d %d %d",&a,&b,&c);
        if(a<b){
            d = a;
            a = b;
            b = d;
        }
        if(a<c){
            d = a;
            a = c;
            c = d;
        }
        printf((a*a-b*b-c*c) ? "NO\n" : "YES\n");
    }
}

C++: #include<stdio.h>
#include<iostream>
#include<algorithm>

using namespace std;

int main(){

int n;
cin>>n;

for(int i=0;i<n;i++){
int tri[3];

cin>>tri[0]>>tri[1]>>tri[2];
sort(tri,tri+3);

if(tri[0]%1==0 && tri[1]%1==0 && tri[2]%2==0) cout<<"YES"<<endl;
else if(tri[0]%1==0 && tri[1]%3==0 && tri[2]%4==0) cout<<"YES"<<endl;
else if(tri[0]%3==0 && tri[1]%4==0 && tri[2]%5==0) cout<<"YES"<<endl;
else if(tri[0]%5==0 && tri[1]%12==0 && tri[2]%13==0) cout<<"YES"<<endl;
}

return 0;

}

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

}

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

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
  int a,b,c,N;
  cin >> N;
  //vector<int> v;
  //while (cin >> a >> b >> c){
  //v.push_back(a,b,c);
  //  }
  //int x = a + b;
  //int y = b + c;
  //int z = c + a;
  //if (x => c || y => a || z => b){
  //cout << "NO" << endl;
  //} else if(x < c || y < a || z < b){
  //cout << "YES" << endl;
  //}
  while(N>0){
    cin >> a;
    cin >> b;
    cin >> c;
    int x = a + b;
    int y = b + c;
    int z = c + a;
    if (x <= c || y <= a || z <= b){
      cout << "NO" << endl; 
      N = N - 1;  
    }else if(x > c || y > a || z > b){
      cout << "YES" << endl;
      N = N - 1;
    }
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

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

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int main(){
	ios::sync_with_stdio(false);

	vi len(3);
	int a, b;
	int n;

	cin >> n;

	REP(i, n){
		cin >> len[0] >> len[1] >> len[2];

		VSORT(len);
		a = len[0] * len[0] + len[1] * len[1];
		b = len[2] * len[2];

		if (a == b)
			puts("YES");
		else
			puts("NO");
	}
}

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

void swap(int *,int *);

int main(void)
{
	int a,b,c;
	int i,n;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
		if(b<a)swap(&a,&b);
		if(c<b)swap(&b,&c);
		if(b<a)swap(&a,&b);
		if( (a/3*4==b) && (a/3*5==c)) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

void swap(int *a,int *b){
	int work;
	work=*a;
	*a=*b;
	*b=work;
}