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 <bits/stdc++.h>
using namespace std;
int main() {
    int T;
    cin >> T;
    while(T--){
        int a,b,c;
        cin >> a >> b >> c;
        if( a > b ) swap(a, b);
        if( b > c ) swap(b, c);
        if( a > b ) swap(a, b);
        if( a * a + b * b == c ){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

C++: #include<stdio.h>
struct eq{

  float x;
  float y;

};

int main(void){

 struct eq s;

  s.x=4.0;

  printf("%f",s.x);




  return 0;
}

C++: #include <iostream>

using namespace std;


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

	cin >> dummy;

	if( dummy != 3 ) return 0;

	while( cin >> a >> b >> c )
	{
		if( check( a, b, c ) || check( b, a, c ) || check( c, a, b ) )
		{
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
		
	}
	return 0;
}

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

C++: #include <iostream>
using namespace std;
int main() {
  int n;
  while(cin >> n) {
    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) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
  return 0;
}

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

inline int square(int x) {
    return x * x;
}

bool is_right_triangle(vector<int> &sides)
{
    sort(sides.begin(), sides.end());
    return square(sides[0]) + square(sides[1]) == square(sides[2]);
}

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

    for (vector<int> sides(3); length > 0 && cin >> sides[0] >> sides[1] >> sides[2]; length--)
        cout << (is_right_triangle(sides) ? "YES" : "NO") << endl;

    return 0;
}

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

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

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

int main() {

    int N = 3;
    int hen[3];
    
    cout << N;
    
 
        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";
       else cout << "NO";
        
    }

    return 0;
}

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

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

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

int main(){

	int a,b,c;
	cin >> a >> b >> c;

	if((a+b)<=c) cout << "No" << endl;
	else if((a+c)<=b) cout << "No" << endl;
	else if((b+c)<=a) cout << "No" << endl;
	else cout << "Yes" << endl;

    return 0;
}

C++: #include <stdio.h>

int main(void) {
  int n;
  int i;
  
  scanf("%d", &n);

  for(i=0; i<n; i++) {
    int max, b, c;
    
    scanf("%d %d %d", &max, &b, &c);

    if (max < b) {
      int tmp = max;
      max = b;
      b = tmp;
    }
    if (max < c) {
      int tmp = max;
      max = c;
      c = tmp;
    }

    if (max * max == b*b + c*c) {
      puts("YES");
    } else {
      puts("NO");
    }
  }

  return 0;
}

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

int main() {

    int N;
    cin >> N;
 
    int hen[3];
    while (N --> 0) {
        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";
        } else {
            cout << "NO";
        }
    }
    

    return 0;
}

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

bool judgeRectTriangle(int , int , int);

int main(void)
{
    int edge1, edge2, edge3;

    scanf("%d", &edge1);//問題文読み間違えたので最初のデータを捨てます。

    while (scanf("%d%d%d", &edge1, &edge2, &edge3) != EOF) {
        if (judgeRectTriangle(edge1, edge2, edge3) ){
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    
    return 0;
}

bool judgeRectTriangle(int x, int y, int z)
{
    if (x * x + y * y == z * z || y * y + z * z == x * x || z * z + x * x == y * y) {
        return true;
    } else {
        return false;
    }
}

C++: #include <iostream>
   
inline bool isRightTriangle(const u_int a, const u_int b, const u_int c){
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}
   
int main(){
    u_int n;
    std::cin >> n;
      
    for (u_int i = 0; i < n; ++i){
        u_int a, b, c;
        std::cin >> a >> b >> c;
        std::cout << (isRightTriangle(a, b, c) ? "YES" : "NO") << std::endl;
    }
   
    return 0;
}

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

#define rep(p,q) for(int i = p; i < q;i++)

//3
int main(void) {
	int num;
	cin >> num;
	rep(0, num) {
		vector<int> line = vector<int>();
		rep(0, 3){
			int a;
			cin >> a;
			line.push_back(a);
		}
		sort(line.begin(),line.end());
		if (pow(line[0],2.0)  + pow(line[1],2.0) == pow(line[2],2.0)) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
	int n=0;
	cin>>n;
	int a,b,c;
	int x,y,z;
	for(int i=1;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;
	}
}