Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	} else {
		return "NO"
	}
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)

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

C++: #include <cstdio>

#define MAX(a, b)((a) < (b) ? (b) : (a))

using namespace std;

int pow32(int base, int exp)
{
    int ret = 1;
    
    while (exp) {
        if ((exp & 1) == 1) ret *= base;
        
        exp >>= 1;
        base *= base;
    }
    
    return ret;
}

void YES()
{
    printf("YES\n");
}

void NO()
{
    printf("NO\n");
}
 
int main() {
	int N;
	int a, b, c;
	int longest;

	scanf("%d", &N);
	
	while (N--) {
	    scanf("%d %d %d", &a, &b, &c);
	    
	    longest = MAX(a, MAX(b, c));
	    
	    if (longest == a) {
	        if (pow32(a, 2) == (pow32(b, 2) + pow32(c, 2))) YES();
	        else NO();
	    } else if (longest == b) {
	        if (pow32(b, 2) == (pow32(a, 2) + pow32(c, 2))) YES();
	        else NO();
	    } else if (longest == c) {
	        if (pow32(c, 2) == (pow32(a, 2) + pow32(b, 2))) YES();
	        else NO();
	    }
	}
	
	return 0;
}

C++: #include <stdio.h>

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

    scanf("%d%d%d",&a,&b,&c);

    a*=a;
    b*=b;
    c*=c;

    if(a == b+c || b== a+c || c==a+b){
        printf("YES\n");
    }else{
        printf("NO\n");
    }

    return 0;
}