Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	// sc.Split(bufio.ScanLines)
	sc.Split(bufio.ScanWords)
	n, _ := strconv.Atoi(read())
	s := make([]int, 3)
	for i := 0; i < n; i++ {
		s[0], _ = strconv.Atoi(read())
		s[1], _ = strconv.Atoi(read())
		s[2], _ = strconv.Atoi(read())
		sort.Sort(sort.IntSlice(s))
		if (s[2] * s[2]) == ((s[0] * s[0]) + (s[1] * s[1])) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

int main(void){
    int i, N, hen[3]={};
    cin >> N;
    for(i=0; i<N; i++){
        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 <string>
#include <cmath>
using namespace std;

string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(x<1 || x>1000 || ceil(x) != floor(x))
        return true;
    else
        return false;
}

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(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            
            break;
        }
        
        else{
            x[N-1] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

C++: #include <iostream>

int main()
{
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    int N, a, b, c;
    std::cin >> N;
    while (std::cin >> a >> b >> c)
        if (a * a + b * b == c * c)
            std::cout << "YES" << std::endl;
        else
            std::cout << "NO" << std::endl;
}

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

int main(){
	int n,a,b,c;
	
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		if(a[0]==3 && a[1]==4 && a[2]==5)puts("YES");else
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])puts("YES");
		else puts("NO");
	}
}

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

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

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

	int a[1000],b[1000],c[1000];
	for(int i = 0;i<n;i++){
		cin >> a[i] >> b[i] >> c[i];
		if (a[i]>b[i]){int g = b[i];b[i] = a[i];a[i] = g;}
		if (b[i]>c[i]){int g = c[i];c[i] = b[i];b[i] = g;}
	}	
	for (int i=0;i<n;i++){
		if(a[i]*a[i]+b[i]*b[i]==c[i]*c[i])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
    return 0;
}

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

int main() {
	int N,a,b,c;
	std::cin >> N;
	while(std::cin >> a >> b >> c){
		std::vector<int> vec;
		vec.push_back(a);
		vec.push_back(b);
		vec.push_back(c);
		std::sort(vec.begin(), vec.end());
		if(vec.at(0) * vec.at(0) + vec.at(1) * vec.at(1) == vec.at(2) * vec.at(2))
			std::cout << "YES" <<std::endl;
		else
			std::cout << "NO" <<std::endl;
	}

	return 0;
}

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)
cout<<"YES\n";
else if(b*b==a*a+c*c)
cout<<"YES\n";
else if(c*c==a*a+b*b)
cout<<"YES\n";
else cout<<"NO\n";
}
return 0;
}

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

int main(){

	int N;
	cin >> N;

	for (int i = 0; i < N; i++){
		int a[3];
		for (int j = 0; j < 3; j++)
			cin >> a[j];
		sort(a, a + 3);

		if (pow(a[2], 2) == pow(a[1], 2) + pow(a[0], 2))
			cout << "YES";
		else
			cout << "NO";
		cout << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<math.h>

using namespace std;

int N;
int a,b,c;

int main(){
	cin >> N;

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

		if(pow(a,2)+pow(b,2) == pow(c,2)){
			cout << "YES" <<endl;
		}else if(pow(a,2)+pow(c,2) == pow(b,2)){
			cout << "YES" <<endl;
		}else if(pow(b,2)+pow(c,2) == pow(a,2)){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}

    return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
	int N;
	int count=0;
	int a[3];
	scanf("%d ",&N);
	while(count!=N){
	for(int i=0;i<3;i++){
		scanf("%d ",a[i]);
	}
	sort(a,a+N);
	if(a[2]<(a[0]+a[1])){
		printf("YES");
		count++;
	}
	else{
		printf("NO");
		count++;
	}
	}
	return 0;
	}

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

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

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

void judgement(int a,int b,int c) {
	if (a == b && b == c || a <= 0 || b <= 0 || c <= 0) {
		cout << "NO" << endl;
		return;
	}
	else if ((a*a) == (b*b) + (c*c) || (b*b) == (a*a) + (c*c) || (c*c) == (a*a) + (b*b)) {
		cout << "YES" << endl;
		return;
	}
	else {
		cout << "NO" << endl;
		return;
	}
}

int main() {
	unsigned int n;//dataset

	cin >> n;

	vector<int> vector_a;
	vector<int> vector_b;
	vector<int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}

C++: #include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
using namespace std;
int main(){
    int a,b,c,i;
    cin>>i;
    for(int n=0;n<i;n++){
        cin>>a>>b>>c;
        if(a*a == b * b + c * c){
            cout<<"YES"<<endl;
        }else if(b*b == a * a + c * c){
            cout<<"YES"<<endl;
        }else if(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,d,i;
	cin>>i;
	for(int n=0;<i;n++;){
 		cin>>a>>b>>c;
  		if(a<b){d=a,a=b,b=a;}
   		else if(a<c){d=a,a=c,c=d;}

   		if(a*a==b*b+c*c){cout<<"Yes"<<endl;}
   		else {cout<<"No"<<endl;}
   	}   
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
  int n;
  while(cin >> n) {
    vector<string> ans;
    for (int i = 0; i < n; ++i) {
      int x, y, z;
      cin >> x >> y >> z;
      if (x < y + z && y < z + x && z < x + y) {
        if (x * x == y * y + z * z || y * y == z * z + x * x || z * z == x * x + y * y) {
          ans.push_back("YES");
        }
      } else {
        ans.push_back("NO");
      }
    }
    for (int i = 0; i < n; ++i) {
      cout << ans[i] << endl;
    }
  }
  return 0;
}

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

int main()
{
    int t;
    cin>>t;
    while(t--){
    int a[3];
    for(int i=0;i<3;i++)
        cin>>a[i];
    sort(a,a+3);
    ll ot=(a[0]*a[0])+(a[1]*a[1]);
    if(ot==(a[2]*a[2])) cout<<"YES\n";
    else cout<<"NO\n";
    }
    return 0;
}