Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

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)
	    sort.Ints(data)
	    if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
	        fmt.Fprintln(out, "YES")
	    }else{
	        fmt.Fprintln(out, "NO")
	    }
	}
}

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
}

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

using namespace std;

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

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int long long i=0;i<n;i++)
using namespace std;
char t[7];
int main(){
    int n;
    cin>>n;
    while(n>0){
    vector<int> v(3);
    rep(i,3){
        int x;
        cin>>x;
        v.push_back(x);
    }
    sort(v.begin(),v.end(),greater<int>());
    if(v[0]==sqrt(v[1]*v[1]+v[2]*v[2])){
        cout<<"YES";
    }else{
        cout<<"NO";
    }
        if(n!=0){
            cout<<endl;
        }
        n--;
    }
    
    return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	int deta[3];
	int square;

	cin >> n;
	
	for (int i = 0; i < n; i++){
		for (int j = 0; j < n; j++){
			cin >> deta[j];
		}
		square = (deta[0] * deta[0]) + (deta[1] * deta[1]);

		if (square == deta[2] * deta[2]){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}

	return 0;
}

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

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

C++: #include <stdio.h>


int main()
{
    int n,a,b,c,sum=0,i;
    while(scanf("%d",&n)==1)
    for(i=0;i<n;i++)
    {
        scanf("%d%d%d",&a,&b,&c);
        sum=sqrt((a*a)+(b*b));
        if(c==sum)
        {
            printf("YES\n");
        }
        else
        printf("NO\n");
    }

    return 0;
}

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

    return 0;
}

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

using namespace std;

int main(){
	int n;
	cin >> n;
	while(--n){
		int a, b, c, sum;
		cin >> a >> b >> c;
		int x, y ,z;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(x*x == y*y + z*z)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
}

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

#define N 1000

struct{int a[3];} d[N];

int main(){
    int i,j,L;
    int longest,small;
    scanf("%d",&j);
    for(i=0; i<j&&i<N; scanf("%d %d %d",&d[i].a[0],&d[i].a[1],&d[i].a[2]),i++);
    L=i;
    for(i=0;i<L;i++){        
        longest=0;
        for(j=0;j<3;j++)
            if(longest<d[i].a[j])
                longest=d[i].a[j];
        for(j=0;j<3;j++)
            if(d[i].a[j]!=longest)
                small+=pow(d[i].a[j],2);
        if(small==pow(longest,2))
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}

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

int main() {

    int N;
    cin >> N;

    int a, b, c;

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

        vector<int> vec;

        vec.push_back(a);
        vec.push_back(b);
        vec.push_back(c);

        sort(vec.begin(), vec.end(), greater<int>());

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

    return 0;
}

C++: #include <stdio.h>

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

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

C++: #include <iostream>

int is_right_triangle(int a, int b, int c) {
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}

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

    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        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>

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

int main()
{
	while (true) {
	    static int x;
	    static int y;
	    static int z;
	    static bool flag[3];
	    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;
	    		}
	   }
}

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

int main(){
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    int a, b, c;
    cin >> a >> b >> c;
    cout << (pow(a, 2) == pow(b, 2) + pow(c, 2) || pow(b, 2) == pow(a, 2) + pow(c, 2) || pow(c, 2) == pow(a, 2) + pow(b, 2) ? "YES" : "NO") << endl;
  }
}

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

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

 using namespace std;

 int main() {
	int num;
	int x,y,z;
	 int answer;
	
	 cin >> num;
	
	 for(int i = 1; i <= num; i++){
		cin >> x >> y >> z;
		 if(x<y)
			 swap(x,y);
		 if(x<z)
			 swap(x,z);
		 if(y<z)
			 swap(y,z);
		
		 if((y*y + z*z)==x*x)
			 cout <<"YES"<<endl;
		 else
			cout << "NO" << endl;
	 }
	
	 return 0;
 }