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"
	}
	return "NO"
}

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

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

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

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

int main(){
    int n, a, b, c;
    
    cin >> n;
    
    for(int i = 0;i < n;i++){
        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;
        }
    }
    
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
   int n,a,b,c;
   cin >> n;

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

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

		system("pause");
		
	 return 0;
	}

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

int main(){

  int n;

  cin>>n;

  vector<int> v(3);
  
  for(int i=0;i<n;++i){
    cin>>v[0]>>v[1]>>v[2];  
    
    sort(v.begin(),v.end());
    if(v[0]*v[0]+v[1]*v[1]==v[2]*v[2])
      cout<<"YES"<<endl;
    else
      cout<<"NO"<<endl;
  }	

}

C++: #include <stdio.h>

int main() {
    
    int l, m, n, i, j;
    
    int big, a, b;
    
    scanf("%d", &i);
    for (j = 0; j < i; j++) {
        
        scanf("%d %d %d", &l, &m, &n);
        
        big = l;
        if (big < m) { a = big; big = m; } else { a = m; }
        if (big < n) { b = big; big = n; }  else { b = n; }
        
        
        if (big * big == a * a + b * b) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
        
    }
    return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main(int argc, char const *argv[])
{
    int n;
    int A[3];
    scanf("%d", &n);
    for(int i=0; i<n; i++){
        scanf("%d %d %d", &A[0], &A[1], &A[2]);
        sort(A, A+3);
        double a= (double)A[0], b= (double)A[1], c= (double)A[2];
        double cosine = (b*b+a*a-c*c)/(2*b*c);

        if(cosine == 0) printf("yes\n");
        else printf("no\n");
    }
    return 0;
}

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

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

	cin >> n;
	while (n--){
		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;
	}
	return 0;
}

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

using namespace std;

int main() {
        int t, a, b, c;
        cin>>t;
        for(int i; i<t; i++) {
                cin>>a>>b>>c;
                int ax = pow(a, 2);
                int bx = pow(b, 2);
                int cx = pow(c, 2);
                if(ax+bx==cx || bx+cx==ax || ax+cx==bx) cout << "YES" << endl;
                else cout << "NO" << endl;
        }
        return 0;
}

C++: #include <bits/stdc++.h>
#define LL long long
#define rep(i,n) for (int i=0;i<(n);i++)
//#define rep(i,x,n) for (int i=x;i<(n);i++)
using namespace std;
int main(){
	
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	cin >> n;
	
	rep(i,n){
		int a, b, c;
		cin >> a >> b >> c;
		if( a*a + b*b == pow(c,2) ){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int tri(int a, int b, int c) {
	if (a > b && a > c)
		return (b*b+c*c == a*a);
	if (b > c)
		return (a*a+c*c == b*b);
	return (a*a+b*b == c*c);
}

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

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

using namespace std;

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

	while(remaining_line--)
	{
		int side[3];
		for(auto& i : side)
			cin >> i;
		sort(side, side+3);

		if(side[0]*side[0] + side[1]*side[1] == side[2]*side[2])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

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

int main(){
  using namespace std;
  int num;
  int line[1000][3];

  cin>>num;
  for(int i=0;i<num;i++){
    cin>>line[i][0]>>line[i][1]>>line[i][2];
    sort(line[i],line[i]+3);
  }
  for(int i=0;i<num;i++){
    if(((line[i][0]*line[i][0])+(line[i][1]*line[i][1]))==(line[i][2]*line[i][2]))cout<<"YES"<<endl;
    else
      cout<<"NO"<<endl;
  }
  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(b*b+c*c==d*d||c*c+d*d==b*b||d*d+b*b==c*c){
			cout <<"YES"<<endl;
		}else{
			cout <<"NO"<<endl;
		}
	}
	return 0;
}

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

int main() {
	int n;
	cin >> n;
	while(n--) {
		int a, b, c;
		cin >> a >> b >> c;
		a = a * a;
		b = b * b;
		c = c * c;
		cout << ((a == b + c || b == a + c || c == a + b) ? "YES" : "NO") << endl;
	}
}

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

int main(){
	int N;
	int A;
	int B;
	int C;
	string Ans[1000];
	cin>>N;
	for(int i = 0;i<N;i++){
		cin>>A>>B>>C;
		int MAX = max(A,max(B,C));
		if(MAX==A){
			if(A*A == B*B+C*C)
				Ans[i] = "YES";
			else
				Ans[i] = "NO";
		}
		else{
				if(MAX==B){				
					if(B*B==A*A+C*C)
						Ans[i] = "YES";
					else
						Ans[i] = "NO";
				}
				else{					
					if(C*C == A*A+B*B)
					Ans[i] = "YES";
					else
					Ans[i] = "NO";
				}
		}
	}
	for(int o = 0;o<N;o++){
		cout<<Ans[o]<<endl;
	}
}

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

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

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

int main(){
  int N;

  cin >> N;
  vector<int> a(N);
  vector<int> b(N);
  vector<int> c(N);

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

  for(int i=0;i<N;i++){
    int aa, bb, cc;

    aa = a.at(i) * a.at(i);
    bb = b.at(i) * b.at(i);
    cc = c.at(i) * c.at(i);

    // cout << aa << endl;
    // cout << bb << endl;
    // cout << cc  << endl;

    if(aa == bb + cc || bb == aa + cc || cc == aa + bb){
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}

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

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

	return 0;
}

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

	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d %d %d",&a ,&b ,&c);
		if(checkRightAngle(a,b,c)){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}

	return 0;
}