Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

int main(){
	int length;
	std::cin >> length;
	for (int i = 0; i < length; i++)
	{
		std::vector<int> side;
		for (int j = 0; j < 3; j++)
		{
			int scan_num;
			std::cin >> scan_num;
			side.push_back(scan_num);
		}
		std::sort(side.begin(), side.end());
		if (side[0] * side[0] + side[1] * side[1] == side[2] * side[2])
			std::cout << "YES\n";
		else
			std::cout << "NO\n";
	}
	return 0;

}

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

C++: #include <stdio.h>

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

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

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

using namespace std;

bool judge_triangle(double a,double b,double c){
	double d=sqrt(pow(a)+pow(b));
	if(d==c) return true;
	else return false;
}

int main(void){
	int i,count;

	cin>>count;

	for(i=0;i<count<i++){
		cin>>a>>b>>c;
		if(judge_triangle(a,b,c)) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

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

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

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

int main(){
	int n,a,b,c;
	
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		if(a[0]==3 && a[1]==4 && a[2]==5)puts("YES");
		else puts("NO");
	}
}

C++: using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            int n;
            n = int.Parse(Console.ReadLine());
            for (int i = 0; i < n; i++)
            {
                int a, b, c;
                a = int.Parse(Console.ReadLine());
                b = int.Parse(Console.ReadLine());
                c = int.Parse(Console.ReadLine());
                if (c * c == a * a + b * b)
                {
                    Console.WriteLine("YES");
                }
                else Console.WriteLine("NO");
            }
        }
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
    int n;cin>>n;
    for(int i=0;i<n;i++)
    {
        vector<int> c(3);cin>>c[0]>>c[1]>>c[2];
        sort(c.begin(),c.end());
        //cout << c[0]<<":" << c[1] <<":"<< c[2]<<":";
        if (c[2]*c[2]==c[1]*c[1]+c[0]*c[0]) cout<<"YES\n";
        else cout<<"NO\n";
    }
}

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

using namespace std;

int N;
int a,b,c;

int main(){
	cin >> N;

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

		if((a^2)+(b^2) == (c^2)){
			cout << "YES" << endl;
		}else if((a^2)+(c^2) == (b^2)){
			cout << "YES" << endl;
		}else if((b^2)+(c^2) == (a^2)){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}

    return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
	int n;
	int a[10000], b[10000], c[10000],d[10000],e[10000];
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i] >= b[i] && a[i] >= c[i]) {
			d[i] = a[i];
		}else if (b[i] >= a[i] && b[i] >= c[i]) {
			d[i] = b[i];
		}else if (c[i] >= a[i] && c[i] >= b[i]) { 
			d[i] = c[i];
		}
		e[i] = a[i] + b[i] + c[i];
	}
	for (int j = 0; j < n; j++) {
		if (d[j] < e[j] - d[j]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: //
// Created by tac on 2016/10/27.
//

#include <cstdlib>
#include <iostream>

namespace {

bool is_traiangle(int a, int b, int c) {
    int a1, b1, c1;
    if (a >= b && a >> c) {
        a1 = a;
        b1 = b;
        c1 = c;
    } else if (b >= a && b >= c) {
        a1 = b;
        b1 = a;
        c1 = c;
    } else {
        a1 = c;
        b1 = a;
        c1 = b;
    }
    return (a1 < b1 + c1) &&
           (b1 < a1 + c1) &&
           (c1 < a1 + b1) &&
           (a1 * a1 == b1 * b1 + c1 * c1);
}

}


int main() {
    int n;
    int a, b, c;
    std::string ans;
    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        std::cin >> a >> b >> c;
        if (is_traiangle(a, b, c)) {
            ans = "YES";
        } else {
            ans = "NO";
        }
        std::cout << ans << std::endl;
    }
    return EXIT_SUCCESS;
}

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

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

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

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
using namespace std;
int main(){
    int n,a,i[3],f[3];
    cin>>n;
    if(n<=1000){
    for(int l=0;l<n;l++){
                for(a=0;a<3;a++){
            cin>>i[a];
            f[a]=i[a]^2;
        }
        if(i[a]<=0||i[a]>1000){
                break;
            }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    }
}

C++: #include<stdio.h>
int main(void)
{
	int a[4] = { 0 }, j, b, cnt, i, n, A = 0, B = 0, c, ruio;
	scanf("%d", &n);
	for (ruio = 0; ruio < n; ruio++) {
		scanf("%d %d %d", &a[0], &a[1], &a[2]);
		for (i = 0; i < 3; i++) {
			for (j = i; j < 3; j++) {
				if (a[i] < a[j]) {
					c = a[i];
					a[i] = a[j];
					a[j] = c;
				}
			}
		}
		for (i = 0; i < 3; i++) {
			printf("%d\n", a[i]);
		}
		if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2]) {
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
	}
	}

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



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