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<stdio.h>
#include<math.h>
#include<iostream>
using namespace std;

int main(void){

	int n,i;
	double x[1000], y[1000], z[1000], a[1000],ya[1000],xa[1000],aa[1000];

	a[0] = 3;
	
	double tmp;

	cin >> n;
	i = 0;

	for (i = 0; i < n; i++) {
		

		

		cin >> x[i] >> y[i] >> z[i];


		
		
		if(x[i] < y[i]){

			tmp = y[i];
			y[i] = x[i];
			x[i] = tmp;
			

		}
		if(y[i] < z[i]){

			tmp = z[i];
			z[i] = y[i];
			y[i] = tmp;
			

		}
		if(x[i] < z[i]){

			tmp = z[i];
			z[i] = x[i];
			x[i] = tmp;
			

		}

		xa[i] = x[i] * x[i];
		ya[i] = y[i] * y[i];
		z[i] = z[i] * z[i];

		if (xa[i] == ya[i] && xa[i] == z[i] && ya[i] == z[i]) aa[i] = 1;
		else aa[i] = 0;	
		

		

		



	}

	

	for (i = 0; i < n; i++) {

		if(aa[i] == 1)printf("NO\n");
		if(aa[i] == 0)printf("YES\n");

		


	}



	return 0;





}

C++: /*
	input: データセット数, データセット(3つずつ)
	output:yes || no
*/

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

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

int main(){
	int N;
	int i=0;
	int hyp=0,cat=0;
	int x=0;
	
	cin >> N;
	int side[N][3];
	
	while(i<N){
		cin >> side[i][0] >> side[i][1] >> side[i][2];
		if(1<=side[i][0] && side[i][0]<= 1000){
			if(1<=side[i][1] && side[i][1]<= 1000){
				if(1<=side[i][2] && side[i][2]<= 1000)
					i++;
			}
		}
	}
	
	for(int j=0; j<i; j++){
		for(int k=0; k<3; k++){
			x = side[j][k]*side[j][k];
			if(hyp <= x){
				cat += hyp;
				hyp = x;
			}
			else
				cat += x;
		}
		if(hyp == cat)
			cout << "YES\n";
		else
			cout << "NO\n";
		hyp=0;
		cat=0;
	}
	
	return 0;
}

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

#define add push_back
#define inf 2147000000

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

using namespace std;

int main(void){
	int a,b;
	
	while(scanf("%d%d",&a,&b)){
	
	a+=b;
	int i=0;
	for(i=0;a>=10;i++){
		a/=10;
	}
	
	cout<<i+1<<endl;
	}
}

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

return 0;
}

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

int main() {
	int i, a[3];
	cin >> i;

	bool ans[i];
	for (int j = 0; i > j; j++) {
		cin >> a[0] >> a[1] >> a[2];

		sort(a,a+3);

		if(a[0]*a[0] + a[1] * a[1] == a[2] * a[2]) ans[j] = true;
		else                                       ans[j] = false;
	}

	for(int j = 0; i > j; j++) {
		if(ans[j] == true) cout<<"Yes"<<endl;
		else               cout<<"No"<<endl;
	}
	return 0;
}

C++: #include<iostream>

short a, b, c;
bool flag;

int main()
{
	while(std::cin>>a>>b>>c)
	{
		flag = false;
		if(a^2+b^2==c^2)
		{
			flag = true;
		}
		else if(a^2+c^2==b^2)
		{
			flag = true;
		}
		else if(b^2+c^2==a^2)
		{
			flag = true;
		}
		if(flag = true)
		{
			printf("YES");
		}
		else
		{
			printf("NO");
		}
	}
	return 0;
}

C++: #include<bits//stdc++.h>
using namespace std;
int main(){
    int n,a[3];cin >> n;
    while(n--){
        cin >> a[0] >> a[1] >> a[2];
        sort(a,a+3);
        if(a[0] * a[0] + a[1] * a[1] == a[2]*a[2]) cout << "YES"<<endl;
        else cout << "NO"<<endl;
    }
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
  int a,b,c;
  int N = 10;
  //vector<int> v;
  //while (cin >> a >> b >> c){
  //v.push_back(a,b,c);
  //  }
  //int x = a + b;
  //int y = b + c;
  //int z = c + a;
  //if (x => c || y => a || z => b){
  //cout << "NO" << endl;
  //} else if(x < c || y < a || z < b){
  //cout << "YES" << endl;
  //}
  while(N>0){
    cin >> a;
    cin >> b;
    cin >> c;
    int x = a + b;
    int y = b + c;
    int z = c + a;
    if (x <= c || y <= a || z <= b){
      cout << "NO" << endl; 
      N = N - 1;  
    }else if(x > c || y > a || z > b){
      cout << "YES" << endl;
      N = N - 1;
    }
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, n1, n2, n3;
	int i = 1;
	cin >> n;
	do{
		cin >> n1 >> n2 >> n3;
		
		if(n1 * n1 + n2 * n2 == n3 * n3)
		cout << "YES" << endl;
		else 
		cout << "NO" << endl;
		i++;
	}while(i <= n);
	
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    array<int, 3> a;
    for (int& i : a) cin >> i;
    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;
  }
}

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

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

    
    return 0;
}

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

bool ans[1000];

bool judge(int a,int b,int c) {
	if (pow(c,2)==(pow(a,2)+pow(b,2))) {
		return true;
	}
	return false;
}

int main() {
	int N,aside[3];
	scanf("%d",&N);
	for(int i=0;i<N;++i) {
		scanf("%d %d %d",&aside[0],&aside[1],&aside[2]);
		sort(aside,aside+3);
		if(judge(aside[0],aside[1],aside[2])) { ans[i]=true; }
		else { ans[i]=false; }
	}
	for(int i=0;i<N;++i) { 
		if(ans[i]) { puts("YES"); }
		else { puts("NO"); }
	}
	return 0;
}

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

int main(void){
	int n;
	cin >> n;
	for(int i=0; i<n; i++){
		int a[3];
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a+2);
		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>

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

	return 0;
}

C++: #include<stdio.h>

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

C++: #include<bits/stdc++.h>
using namespace std;
int n;
int main(){
    cin>>n;int a[3]={0};
    for(int i=0;i<n;i++){
        cin>>a[0]>>a[1]>>a[2];
        sort(a,a+3);
        cout<<((a[2]*a[2])==(a[1]*a[1]+a[0]*a[0])?"YES":"NO")<<endl;
    }
}

C++: #include <iostream>
#include <math.h>
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 || a*a + c*c == b*b || c*c + b*b == a*a)
			cout << "YES\n";
		else
			cout << "NO\n";
	}
	return 0;
}

C++: def main():
    n = int(input())
    for i in range(n):
        a, b, c=(int(x) for x in input().split())
        if a+b<=c or a+c<=b or b+c<=a:
            print("NO")
        else:
            print("YES")

main()