// This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <stdio.h>

int main()
{
int n;
    scanf("%d",&n);
    
    for(int i=0;i<n;i++){
int a;
int b;
int c;
    scanf("%d",&a);
    scanf("%d",&b);
    scanf("%d",&c);
    
if(a*a+b*b==c*c){
    printf("YES\n");
}
else if(b*b+c*c==a*a){
    printf("YES\n");
}
else if(c*c+a*a==b*b){
    printf("YES\n");
}
else {
    printf("NO\n");
}
        
}
}
// GCC reference:
//   https://gcc.gnu.org/

// C++ language references:
//   https://msdn.microsoft.com/library/3bstk3k5.aspx
//   http://www.cplusplus.com/
//   https://isocpp.org/
//   http://www.open-std.org/jtc1/sc22/wg21/

// Boost libraries references:
//   http://www.boost.org/doc/