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 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, max;

	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 <bits/stdc++.h>
using namespace std;

int N;
int a[3]; 
int b,c,d;

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    b = a[1]*a[1];
    c = a[2]*a[2];
    d = a[3]*a[3];
    if ( b + c == d ) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  
}

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

int main()
{
  int n;
  int side[3];
  cin >> n;

  for (int i = 1; i <= n; i++){

    for (int j = 0; j <= 2; j++){
      cin >> side[j];
    }
    for (int j = 0; j < 2; j++){
      if (side[j] >= side[j + 1]){
        int s = side[j + 1];
        side[j + 1] = side[j];
        side[j] = s;
      }
    }
    if ((side[2] * side[2]) == ((side[0] * side[0]) + (side[1] * side[1]))){
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  
  return 0;
}

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

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

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

        double a2, b2, c2;
        a2 = pow(a,2);
        b2 = pow(b,2);
        c2 = pow(c,2);

        if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

int main()
{
 int a,b,c,n;
 while (cin>>n)
 for(int i=0;i<=n;i++)
  {
  while(cin>>a,b,c)
{
int asq=a*a,bsq=b*b,csq=c*c;
if(asq+bsq==csq||bsq+csq==asq||

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

int main(){
	int n, a, b, c, x, y, z;
	
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(y*y + z*z == x*x)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main(){
    int q;
    cin>>q;
    while(q--){
        int a[3];
        cin>>a[0]>>a[1]>>a[2];
        sort(a, a+3);
        if(pow(a[2], 2)==pow(a[1],2)+pow(a[0], 2))
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}

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

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



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

  int tri[100000][3];
  
  int i=0;
  for(i;i<n;i++){
      scanf("%d %d %d",&tri[i][0],&tri[i][1],&tri[i][2]);
	}
  i=0;
  for(i;i<n;i++){
    int j=0;
    j=judge(tri[i][0],tri[i][1],tri[i][2]);
    
    if(j==1)
      printf("YES\n");
    else
      printf("NO\n");
  }
}

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

int main(){
int n;
int a,b,c;

scans(" %d",&n);

for(int i=0;i<n;i++){
scanf(" %d %d %d",&a,&b,&c);
if(a*a==b*b+c*c||c*c==b*b+a*a||b*b=a*a+c*c){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}

return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
    int n,x,y,z;
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> x >> y >> z;
        int X,Y,Z;
        X = x*x;
        Y = y*y;
        Z = z*z;
        if(X+Y==Z || Y+Z==X || X+Z==Y){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include <stdio.h>

int judge_right_triangle(int a, int b, int c);

int main(void)
{
    int number;
    scanf("%d", &number);
    for(int j = 0; j < number; j = j + 1){
      int print_right_triangle;
      int x, y, z;
      scanf("%d %d %d", &x, &y, &z);
      print_right_triangle = judge_right_triangle(x, y, z);
      if (print_right_triangle == 1) {
        printf("YES\n");
      } else if (print_right_triangle == 0) {
          printf("NO\n");
        }
    }
  return 0;
}

int judge_right_triangle(int a, int b, int c)
{
    int t;
    if (a * a + b * b == c * c){
      t = 1;
    } else if (a * a + c * c == b * b) {
      t = 1;
    } else if ( b * b + c * c == a * a) {
      t = 1;
    }
  //三平方の定理を満たすときt=１を返す                                                                                                                                               
    else{
      t = 0;
    }
    return t;
}

C++: #include <iostream>

using namespace std;

int main(){

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

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

return 0;
}

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

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n,a[3];
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>a[0]>>a[1]>>a[2];
    sort(a,a+3);//a[0]<=a[1]<=a[2]
    if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
}

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

int main() {
    string str;
    int n;
    cin >> n;
    vector<int> vx, vy, vz;
    for(int i = 0; i < n; i++) {
        int x, y, z;
        cin >> x >> y >> z;
        vx.push_back(x);
        vy.push_back(y);
        vz.push_back(z);
    }
    
    for(int i = 0; i < n; i++) {
        vector<int> v;
        v.push_back(vx[i]);
        v.push_back(vy[i]);
        v.push_back(vz[i]);

        sort(v.begin(), v.end());
        if(pow(v[2],2.0) == pow(v[0],2.0) + pow(v[1],2.0)){
            str = "Yes";
        } else {
            str = "No";
        }
        cout << str << endl;
    }  
}

C++: #include <cstdio>

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