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

bool is_right_triangle(int a, int b, int c){
  // a2 >= b2 >= c2
  int a2, b2, c2;
  
  if(a >= b && a >= c){
    a2 = a * a;
    
    if(b >= c){
      b2 = b * b;
      c2 = c * c;
    } else {
      b2 = c * c;
      c2 = b * b;
    }
  } else if(b >= a && b >= c){
    a2 = b * b;

    if(a >= c){
      b2 = a * a;
      c2 = c * c;
    } else {
      b2 = c * c;
      c2 = a * a;
    }
  } else if(c >= a && c >= b){
    a2 = c * c;

    if(a >= b){
      b2 = a * a;
      c2 = b * b;
    } else {
      b2 = b * b;
      c2 = a * a;
    }
  }

  if(a2 == b2 + c2) return true;
  else return false;
}

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

  int a,b,c;

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

    if(is_right_triangle(a, b, c)) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  
  return 0;
}

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

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


    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
    int T;
    cin >> T;
    while(T--){
        int a,b,c;
        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 ){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

C++: #include<stdio.h>
struct eq{

  float x;
  float y;

};

int main(void){

 struct eq s;

  s.x=4.0;

  printf("%f",s.x);




  return 0;
}

C++: #include <iostream>

using namespace std;


bool check( int a, int b, int c )
{
	if( ( a * a ) == ( b * b ) + ( c * c ) )
	{
		return true;
	}else{
		return false;
	}
}
int main()
{
	int a, b, c, dummy;

	cin >> dummy;

	if( dummy != 3 ) return 0;

	while( cin >> a >> b >> c )
	{
		if( check( a, b, c ) || check( b, a, c ) || check( c, a, b ) )
		{
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
		
	}
	return 0;
}

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

C++: #include <iostream>
using namespace std;
int main() {
  int n;
  while(cin >> n) {
    for (int i = 0; i < n; ++i) {
      int x, y, z;
      cin >> x >> y >> z;
      if (x < y + z && y < z + x && z < x + y) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
  return 0;
}

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

inline int square(int x) {
    return x * x;
}

bool is_right_triangle(vector<int> &sides)
{
    sort(sides.begin(), sides.end());
    return square(sides[0]) + square(sides[1]) == square(sides[2]);
}

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

    for (vector<int> sides(3); length > 0 && cin >> sides[0] >> sides[1] >> sides[2]; length--)
        cout << (is_right_triangle(sides) ? "YES" : "NO") << endl;

    return 0;
}

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

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

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

int main() {

    int N = 3;
    int hen[3];
    
    cout << N;
    
 
        cin >> hen[0] >> hen[1] >> hen[2];
    
    
    sort(hen, hen + 3);
    
  
    
    if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) {
        cout << "YES";
       else cout << "NO";
        
    }

    return 0;
}

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

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

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

int main(){

	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 <stdio.h>

int main(void) {
  int n;
  int i;
  
  scanf("%d", &n);

  for(i=0; i<n; i++) {
    int max, b, c;
    
    scanf("%d %d %d", &max, &b, &c);

    if (max < b) {
      int tmp = max;
      max = b;
      b = tmp;
    }
    if (max < c) {
      int tmp = max;
      max = c;
      c = tmp;
    }

    if (max * max == b*b + c*c) {
      puts("YES");
    } else {
      puts("NO");
    }
  }

  return 0;
}

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

int main() {

    int N;
    cin >> N;
 
    int hen[3];
    while (N --> 0) {
        cin >> hen[0] >> hen[1] >> hen[2];
        sort(hen, hen + 3);
        
        if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) {
            cout << "YES";
        } else {
            cout << "NO";
        }
    }
    

    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>
   
inline bool isRightTriangle(const u_int a, const u_int b, const u_int c){
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}
   
int main(){
    u_int n;
    std::cin >> n;
      
    for (u_int i = 0; i < n; ++i){
        u_int a, b, c;
        std::cin >> a >> b >> c;
        std::cout << (isRightTriangle(a, b, c) ? "YES" : "NO") << std::endl;
    }
   
    return 0;
}