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

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

C++: #include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <limits.h>
#include <cctype>

#include <iostream>
#include <vector>
#include <deque>
#include <queue>
#include <map>
#include <algorithm>


using namespace std;

#define Max INT_MAX
#define Inf (INT_MAX/2)
#define Min INT_MIN


#define rep(i, n) for(int i = 0; i < n; i++)
#define repi(i,l,n) for(int (i)=(int)(l);(i)<(int)(n);(i)++)
// s <= x < g ?
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
// 0 <= x < w && 0 <= y < h ?
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))

typedef pair<int, int> P;

int main()
{
    int N;
    cin >> N;
    rep(i,N){
        int a,b,c;
        int d[3];
        cin >> a >> b >> c;
        d[0] = a;
        d[1] = b;
        d[2] = c;
        sort(d, d+3);
        if( pow(d[0],2) + pow(d[1],2) == pow(d[2],2) ){
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

C++: #include <iostream>

inline bool is_right_triangle(u_int a, u_int b, u_int c) {
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}

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

    std::cin >> n;
    while (std::cin >> a >> b >> c) {
        if (is_right_triangle(a, b, c)) {
            std::cout << "Yes" << std::endl;
        } else {
            std::cout << "No" << std::endl;
        }
    }

    return 0;
}

C++: #include <iostream>
#include <algorithm>
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" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    

    return 0;
}

C++: #include<iostream>
#include<math.h>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j<n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(pow(a[2],2)==pow(a[1],2)+pow(a[0],2)){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
  return 0;
}

C++: #include <iostream>

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

int main()
{
    int x;
	int y;
    int z;
	bool flag[3];
	int n;
	std::cin >> n;
	while (n > 0) {
	    std::cin >> x >> y >> z;
	    flag[0] = judgement(x, y, z);
	    flag[1] = judgement(y, z, x);
	    flag[2] = judgement(z, x, y);
	    if (flag[0] || flag[1] || flag[2]) {
	    	std::cout << "YES" << std::endl;
	    	} else {
	    		std::cout << "NO" << std::endl;
	    		}
	    n --;
	   }
}

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

int main(){
  int a,b,c;
  std::cin>>a;
  std::cin>>b;
  std::cin>>c;
  if (a*a==b*b+c*c) std::cout<<"YES";
  else if (b*b==a*a+c*c) std::cout<<"YES";
  else if (c*c==a*a+b*b) std::cout<<"YES";
  else std::cout<<"NO"<<std::endl;
  

	
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(){
  using namespace std;
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    vector<int> edge(3);
    for(int j = 0; j < 3; j++){
      cin >> edge[j];
    }
    sort(edge.begin(), edge.end());
    int l,m,s;
    s = edge[0];
    m = edge[1];
    l = edge[2];
    cout << s << m << l << endl;
    if(l*l == m*m + s*s){
      cout << "Yes" << endl;
    }else{
      cout << "No" << endl;
    }
  }
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main () {
	int v[3]; cin >> v[0];
	while (cin >> v[0] >> v[1] >> v[2]) {
		sort (v, v + 3);
		cout << (*v**v + *(v + 1)**(v + 1) == *(v + 2)**(v + 2) ? "YES" : "NO") << endl;
	}
}

C++: #include <iostream>
 
int main(){
 
    int a[3];
    int i,j;
    std::cin >> j;
 
    for(i=0;i<j;i++){
        std::cin >> a[0] >> a[1] >> a[2];
        if(a[0]>a[1]){
	int sum=a[0];
	a[0]=a[1];
	a[1]=sum;
        }
        if(a[1]>a[2]){
	int sum1=a[1];
	a[1]=a[2];
	a[2]=sum1;
        }
        if(a[0]>a[1]){
	int sum2=a[0];
	a[0]=a[1];
	a[1]=sum2;
        }
        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])
             std::cout << "YES" << std::endl;
        else
             std::cout << "NO" << std::endl;
        }
        return 0;
}

C++: #include<stdio.h>
int main(){
  int n,i,j,l;
  int data[3];
  scanf("%d",&n); 
  for(l=0;l<n;l++){
    scanf("%d %d %d",&data[0],&data[1],&data[2]);
    for(i=0;i<2;i++){
      for(j=0;j<2-i;i++){
	if(data[j]>data[j+1]){
	  int temp;
	  temp=data[j];
	  data[j]=data[j+1];
	  data[j+1]=temp;
	}
      }
    }
    if(data[0]*data[0]+data[1]*data[1]==data[2]*data[2]){
      printf("YES\n");
    } else{
      printf("NO\n");
    }
  }
  return(0);
}

C++: #include<iostream>
using namespace std;
int main(){
  int a,b,c,N;
    
  cin >> N;
  bool count[N];
  for(int i=0;i<N;i++){
    cin >> a >> b >> c;
    if(a*a==b*b+c*c || b*b==a*a+b*b || c*c==a*a+b*b){
      count[i]=true;}
  }
  for(int i=0;i<N;i++){
    if(count[i]==true){
      cout << "YES" << endl;}

    else {
      cout << "NO" << endl;}
  }
 
  return 0;
}

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

using namespace std;

int power(int a, int n){
  int result = a;
  for(int i = 1; i < n; i++){
    result *= a;
  }
  return result;
}

int main(){
  int n;
  cin >> n;
  vector<bool> result;
  for(int i = 0; i < n; i++){
    vector<int> tri;
    for(int j = 0; j < 3; j++){
      int tmp;
      cin >> tmp;
      tri.push_back(tmp);
    }
    sort(tri.begin(),tri.end());
    if(power(tri[0],2) + power(tri[1],2) == power(tri[2],2)){
      result.push_back(true);
    }else{
      result.push_back(false);
    }
  }
  for(int i = 0; i < n; i++){
    if(result[i]){
      cout << "YES\n";
    }else{
      cout << "NO\n";
    }
  }
  return 0;
}

C++: #include <cstdio>

using namespace std;

bool valid(int a, int b, int c) {
  int a2 = a*a, b2 = b*b, c2 = c*c;
  return (a2+b2==c2) || (b2+c2==a2) || (c2+a2==b2);
}

int main() {
  int N;
  scanf("%d", &N);
  for (int i=0;i<N;i++) {
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    if (valid(a, b, c)) puts("YES");
    else puts("NO");
  }
  return 0;
}

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

int main() {
  int a,b,c;
  scanf("%d %d %d", &a, &b, &c); 
  std::vector<int> v;
  v.push_back(a);
  v.push_back(b);
  v.push_back(c);
  sort(v.begin(),v.end());
  if((a*a)+(b*b)==(c*c)) {
    std::cout << "YES" << std::endl;
  }
  else {
    std::cout << "NO" << std::endl;
  }
}