Go: package main

import (
  "fmt"
)


func main() {
  var a int
  var b int
  var c int
  var n int
  fmt.Scan(&n)
  for _, err := fmt.Scan(&a, &b, &c); err == nil; _, err = fmt.Scan(&a, &b, &c) {
    if a*a == b*b+c*c {
      fmt.Println("YES")
    } else if b*b == c*c+a*a {
      fmt.Println("YES")
    } else if c*c == a*a+b*b {
      fmt.Println("YES")
    } else {
      fmt.Println("NO")
    }
  }
}

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

int main(){
    int length[3];
    int n,A,B,C;
    scanf("%d",&n);
 
    for(int i=0;i<n;i++){
        cin >> length[0] >> length[1] >> length[2];       
        A = length[0] * length[0];
        B = length[1] * length[1];
        C = length[2] * length[2];
        if(A+B==C||B+C==A||C+A==B){
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl;
        }
    }
}

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

using namespace std;

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

C++: #include<iostream>

int main(void){
	int a,b,c,n,i;
	std::cin>>n;
	for(i=0;i<n;i++){
		std::cin>>a;
		std::cin>>b;
		std::cin>>c;
		if(a*a==b*b+c*c)std::cout<<"YES"<<std::endl;
		else if(b*b==a*a+c*c)std::cout<<"YES"<<std::endl;
		else if(c*c==a*a+b*b)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 (2 * max(max(a,b),c) * max(max(a,b),c) == a*a+b*b+c*c ) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

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

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

int main(void)
{
    int n;
    cin >> n;
    while (n-- > 0)
    {
        int a, b, c;
        cin >> a >> b >> c;
        a *= a;
        b *= b;
        c *= c;
        if (a + b == c || b + c == a || a + c == b)
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    return 0;
}

C++: #include<iostream>

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

int main()
{
    int x,y,z,N;
    std::cin >> N;
    for (int i = 0; i < N; i++) {
        std::cin >> x >> y >> z;
        if (right_triangle(x,y,z)) {
            std::cout << "Yes" << std::endl;
        }else if (right_triangle(x,y,z) == 0 ) { 
            std::cout << "No" << std::endl;
        }
    }   
    return 0;
}                                                         1,1          ??????

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

int main(){
	int i;
	cin >> i;
	for(i;i>=1;i--){
	
	int a, b,c;
	cin >>a;
	cin >>b;
	cin >>c;
	if(a*a+b*b==c*c|b*b+c*c==a*a|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;
		int a2=a*a, b2=b*b, c2=c*c;
		if(a2+b2==c2 || a2+c2==b2 || b2+c2==a2)
		{
			cout << "YES\n";
		}
		else
		{
			cout << "NO\n";
		}
	}
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define shosu(n) setprecision(n)
using namespace std;
int main() {
  int A[3], N;
  cin >> N;
  for (int Q = 0; Q < N; Q++) {
    rep(i, 3) cin >> A[i];
    sort(A, A + 3);
    if (A[0] * A[0] + A[1] * A[1] - A[2] * A[2] == 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main(){
	int t,s=-1,j;
	cin>>t;
	while(t--){
		int a[3],x=0;
		for(int i=0;i<3;i++){
			cin>>a[i];
			if(s<a[i]) j=i;
			x+=a[i];
		}
	    x-=a[j];
	    if(x<a[j]) cout<<"NO"<<endl;
	    else{
	    	x=0;
	    	for(int i=0;i<3;i++){
	    	 a[i]=pow(a[i],2);
	    	 if(i!=j) x+=a[i];
	        }
	        if(a[j]==x) cout<<"YES"<<endl;
	        else cout<<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include <stdio.h>
     
int triJudgefunc(int x, int y, int z);
     
int main(void)
{
    int row;
    scanf("%d", &row);
    for (int i = 0; i < row; ++i) {
        int firstn, secondn ,thirdn; 
        scanf("%d %d %d", &firstn, &secondn, &thirdn);
        if (triJudgefunc(firstn, secondn, thirdn) == 0) {
        printf("YES\n");
        } else {
        printf("NO\n");
        }
    }
    return 0;
}
     
     
     
int triJudgefunc(int x, int y, int z)
{
    int maxlength, notmax1, notmax2;
    if (x > y) {    //x > y
        if (x > z) {
            maxlength = x; notmax1 = y; notmax2 = z;    //x???max
        } else {
            notmax1 = x; notmax2 = y; maxlength = z;    //z???max
        }
    } else {    //y > x
        if (y > z) {
            notmax1 = x; maxlength = y; notmax2 = z;    //y???max
        } else {
            notmax1 = x; notmax2 = y; maxlength = z;    //z???max
        }
    }
    int result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2;
    return result;
}

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 <algorithm>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main() {
    int N;
    cin >> N;
    int a[3];
    REP(i,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" << '\n';
        else
            cout << "NO" << '\n';
    }
        

}

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

using namespace std;

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

C++: #include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main(){
    int a , b;
    while( cin >> a >> b ){
        stringstream ss;
        ss << a+b ;
        string str = ss.str();
        cout << str.size() << endl;
    }
}