#include<iostream>
using namespace std;
void func(int*&p,int n)
{int i;
p=NULL;
p=new int[n];
for(i=0;i<n;i++)
p[i]=i;
}
int main()
{int *a,*b,*c,a1,b1,c1,i,j,t,n;
cin>>n;
func(a,n);
func(b,n);
func(c,n);
for(i=0;i<n;i++)
cin>>a[i]>>b[i]>>c[i];
for(i=0;i<n;i++)
{if(a[i]<b[i]){t=a[i];a[i]=b[i];b[i]=t;}
if(a[i]<c[i]){t=a[i];a[i]=c[i];c[i]=t;}
a1=a[i]*a[i];
b1=b[i]*b[i];
c1=c[i]*c[i];
if(a1==b1+c1)
cout<<"Case"<<i+1<<":"<<"Yes"<<endl;
else
cout<<"Case"<<i+1<<":"<<"No"<<endl;}
}