#include <stdio.h>

int main ()
{
    int n=0,i=0,a,b,c;
    scanf("%d",&n);
    if(n<=1000)
    {
    while(n--)
    {
        scanf("%d%d%d",&a,&b,&c);
        if(a>1000 || a<1 || b>1000 || c>1000 || a<1 || b<1 || c<1)
            break;

          if(n==0){
            if(c*c == (a*a + b*b))
            printf("YES");
           else
            printf("NO");
        }
           else{
            if(c*c == (a*a + b*b))
            printf("YES\n");
           else
            printf("NO\n");
        }
    }
    }
    return 0;
}