Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i := 0; i < n; i++ {
		data := nextInts(3)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

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

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

C++: #include<stdio.h>
int main()
{
    int N,a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    N=a,b,c;
    if(a>=1 && a<=1000)
    if(b>=1 && b<=1000)
    if(c>=1 && c<=1000)
        if((a+b)<c)
            printf("YES");
        else if((b+c)<a)
            printf("YES");
        else if((c+a)<b)
            printf("YES");
        else
            printf("NO");
    return 0;

}

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

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

C++:  #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 
 using namespace std;
 
 int compare(int a,int b)
 {
   return a>b;    
 }

 int main()
 {
   int num;
   int arr[3];
   cin>>num;
   while(num--)
   {
     for(int i=0;i<3;i++) cin>>arr[i];
     sort(arr,arr+3);
     if(pow(arr[0],2)+pow(arr[1],2)==pow(arr[2],2)) cout<<"YES"<<endl;
     else cout<<"NO"<<endl;              
   }
   //while(1);      
   return 0;    
 }

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

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

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

bool checkRightTriangle(int side1, int side2, int side3) {
  std::vector<int> edges;
  edges.push_back(side1);
  edges.push_back(side2);
  edges.push_back(side3);
  std::sort(edges.begin(), edges.end(), std::greater<int>());
  if (edges[0] > edges[1] + edges[2]) {
    return false;
  } else {
    return true;
  }
}

int main(int argc, char const *argv[]) {
  int data_num;
  std::cin >> data_num;

  int a, b, c;
  std::vector<bool> results;

  for (size_t i = 0; i < data_num; i++) {
    std::cin >> a >> b >> c;
    results.push_back(checkRightTriangle(a, b, c));
  }

  for (bool result : results) {
    if (result) {
      std::cout << "YES" << '\n';
    } else {
      std::cout << "NO" << '\n';
    }
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int N, s1, s2, s3;

	while(cin >> N)
	{
		while(N--)
		{
			cin >> s1 >> s2 >> s3;
			if(s1*s1 + s2*s2 == s3*s3 || s1*s1 + s3*s3 == s2*s2 || s3*s3 + s2*s2 == s1*s1)
				cout << "YES\n";
			else
				cout << "NO\n";
		}
	}
	return 0;
}

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

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

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

int main() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        int a[5];
        for (int j = 0; j < 3; j++) cin >> a[j];
        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 <iostream>
#include <array>

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

int showResult(int a, int b, int c)
{
	if(checkTriangle(a,b,c)) {
		std::cout << "Yes" << std::endl;
	} else {
		std::cout << "No" << std::endl;
	}
	return 0;
}
	
int main()
{
	int N = 0;
	std::array<int, 1000>t1;
	std::array<int, 1000>t2;
	std::array<int, 1000>t3;
	std::cin >> N;
	
	if(N == 0) {
		return 0;
	}
	for(int i = 0; i < N; i++) {
		std::cin >> t1.at(i) >> t2.at(i) >> t3.at(i);
	}
	std::cout << std::endl;
	for(int i = 0; i < N; i++) {
		showResult(t1.at(i), t2.at(i), t3.at(i));
	}
	return 0;	
}

C++: #include <iostream>

using namespace std;

int main() {
	int count;
	cin >> count;
	
	while(count-- >0){
		int t[3];
		for(int i=0;i<3;i++){
			cin >> t[i];
		}
		if(((t[0]*t[0])==((t[1]*t[1])+(t[2]*t[2]))) || ((t[1]*t[1])==((t[0]*t[0])+(t[2]*t[2]))) || ((t[2]*t[2])==((t[1]*t[1])+(t[0]*t[0])))){
			cout << "YES" <<endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main(){
	for (int x = 0; x < 82;)
	{
		int a = 0;
		int b = 0;
		int c = 0;
		int d = a*a;
		int e = b*b;
		int f = c*c;
		cin >> a >> b >> c;
		if (d + e == f)
		{
			cout << "YES" << endl;
		}
		else if (d + f == e)
		{
			cout << "YES" << endl;
		}
		else if (e + f == d)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}



	}
	getchar();
	getchar();
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void)
{
	int i;
	int a[3];

	for(i = 0; i < 3; i++){
		cin >> a[i];
	}
	a[0] = a[0]^2;
	a[1] = a[1]^2;
	a[2] = a[2]^2;

	if((a[0] == (a[1] + a[2])) || (a[1] == (a[0] + a[2])) || (a[2] == (a[0] + a[1]))){
		cout << "OK " << endl;
	}
	else{
		cout << "NO" << endl;
	}
	return 0;
	
}

C++: #include<stdio.h>
#include<math.h>
int main()
{
	int n,i;
	int a[1000],b[1000],c[1000];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d%d",&a[i],&b[i],&c[i]);
	}
	for(i=0;i<n;i++){
		if((c[i]*c[i])==(a[i]*a[i]+b[i]*b[i])||(a[i]*a[i])==(b[i]*b[i]+c[i]*c[i])||(b[i]*b[i])==(a[i]*a[i]+c[i]*c[i])){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

C++: #include <stdio.h>

using namespace std;


int main(){
	int n,a,b,c,A,B,C;
	scanf("%d",&n);

	for(int i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
		A = a*a;
		B = b*b;
		C = c*c;
		if(A+B==C||B+C==A||C+A==B){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}

    return 0;
}