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

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
    if(N <= 0 || N > 1000)
        
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(a < 1 || a > 1000 || b < 1 || b > 1000 || c < 1 || c > 1000){
            
            break;
        }
        
        else{
    if(a+b>c && b+c>a && c+a>b){
        x[n]="YES";
    }
    else{
        x[n]="NO";
    }
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>


using namespace std;

string tri(int a, int b, int c){
	if(a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b)return "YES";
	return "NO";
}

int main(void) {
	int len, a, b, c;
	cin >> len;
	for(int i = 0; i < len; i++){
		cin >> a >> b >> c;
		cout << tri(a, b, c) << endl;
	}
}

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

int main(){
	int n;
	cin >> n;
	vector<char*> s;
	for(int i=0;i<n;++i){
		int a[3];
		scanf("%d %d %d",a,a+1,a+2);
		sort(a,a+3);
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])
			s.push_back("YES\n");
		else
			s.push_back("NO\n");
	}
	for(int i=0;i<n;++i)
		cout << s[i];
	return 0;
}

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

int main(){
	int num;
	cin >> num;
		priority_queue<int> pq;
	for (int i = 0; i < num; ++i) {
		for (int j = 0; j < 3; ++j) {
			int a;
			cin >> a;
			pq.push(a);
		}
		int a, b, c;
		a = pq.top();
		pq.pop();
		b = pq.top();
		pq.pop();
		c = pq.top();
		pq.pop();
		if (a * a == b * b + c * c) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    
    int n;
    cin >> n;
    
    for (int i=0;i<n;i++){
    int a,b,c;
    cin >> a >> b >> c;
    
    if(c*c == a*a+b*b || a*a == b*b+c*c || b*b == a*a+c*c){
        cout << "YES" <<endl;

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

C++: #include <iostream>
using namespace std;
int main(){
	int n;
	cin>>n;

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

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

	return 0;
}

C++: #include<iostream>
int main(){
	using namespace std;
	int j,n,leng[1000];
	cin>>n;
	for(int i=0;i<n;++i){
		cin>>leng[(3*i)]>>leng[(3*i)+1]>>leng[(3*i)+2];
		for(int a=0;a<3;++a)
        for(int b=0;b<3;++b)
            if(leng[(3*i)+a]>leng[(3*i)+b])j=leng[(3*i)+a],leng[(3*i)+a]=leng[(3*i)+b],leng[(3*i)+b]=j;

	}	
	for(int i=0;i<n;++i){
		if((leng[(3*i)]^2)+(leng[(3*i)]^2)==leng[(3*i)+2]^2)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
 
signed main(){
 int a;
 cin>>a;
 int b[3];
 for(int d=0;d<a;d++){
     for(int c=0;c<3;c++)scanf("%d",&b[c]);
 sort(b,b+3);
 if(b[0]*b[0]+b[1]*b[1]==b[2]*b[2])printf("YES\n");
 else printf("NO\n");
     }
}

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

int main()
{
    int n;          //データセットの数
    int a, b, c;    //各辺の長さ
    cin >> n;

    priority_queue<int> *qs = new priority_queue<int>[n];

    for(int i = 0; i < n; ++i){
        cin >> a >> b >> c;
        qs[i].push(a);
        qs[i].push(b);
        qs[i].push(c);
    }

    for(int i = 0; i < n; ++i){
        c = qs[i].top();
        qs[i].pop();
        a = qs[i].top();
        qs[i].pop();
        b = qs[i].top();
        if(pow(c, 2) == pow(a, 2) + pow(b, 2))
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }

    return 0;
}

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

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

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

int main(){
	const int N = 1000;
	int n,a[N],b[N],c[N];
	while(cin>>n){
		for(int i=1;i<=n;i++){
			cin>>a[i]>>b[i]>>c[i];
		}
		for(int i=1;i<=n;i++){
			if(a[i]*a[i] + b[i]*b[i] == c[i]*c[i] || a[i]*a[i] == b[i]*b[i] + c[i]*c[i] || a[i]*a[i] + c[i]*b[i] == b[i]*c[i]){
				cout<<"YES"<<endl;
			}
			else cout<<"NO"<<endl;
		}
	}
}

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


int main() {
	int n;
	cin >> n;
	int a[1000];
	int b[1000];
	int c[1000];
	int d[3];

	for(int i=0;i<n;i++){
			cin >> a[i] >> b[i] >> c[i]; 
	}
	for(int i=0;i<n;i++){
		int max=0;
		d[0]=a[i];
		d[1]=b[i];
		d[2]=c[i];
		sort(d, d + 3);
		if(d[0]+d[1]>d[2]){
			cout << "YES"<<"\n";
		}else{
			cout << "NO"<<"\n";
		}
	}
	return 0;
}

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

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

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

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

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

int compare_int(const void *a, const void *b)
{
    return *(int*)a - *(int*)b;
}

int check(int a[3])
{
    qsort(a, 3, sizeof(int), compare_int);
    return a[0] * a[0] + a[1] * a[1] - a[2] * a[2];
}

int main(void)
{
    int t;
    scanf("%d", &t);
    for (int i = 0; i < t; i++) {
        int sides[3];
        for (int j = 0; j < 3; j++) {
            scanf("%d", &sides[j]);
        }
        if (check(sides) == 0) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}