Pythagorean triples , WA

#include<stdio.h>

int main(void)
{
long long int t;
scanf("%lld",&t);

 while(t--)
  {
     long long int a,b,c;
     scanf("%lld%lld%lld",&a,&b,&c);
     
     long long int n,k;
     
     n=a*a+b*b;
     k=c*c;
     
     if(n==k)
     printf("YES\n");
     
     else
     printf("NO\n");
    
  } 

  return 0;

}

Why my program is giving WA ?

because you should take c as c>=a+b.

I think this is one possibility (the one that you have checked in your code)
n = a * a + c * c;
k = a * a;
and
n = c * c + b * b;
k = a * a;

these are other two possible cases, unless it is given in the problem that c is always the largest side.