#include <stdio.h>
 
int main()
{
    int a[3];
    int n, i, j, max;
    
    scanf("%d", &n);
    
    for(i = 0; i < n; i++){
      
      max = 0;
      
      for(j = 0; j < 3; j++){
        scanf("%d", &a[j]);
        if(a[max] < a[j])
          max = j;
      }
      
      if(2*a[max]*a[max] == (a[1]*a[1]) + (a[2]*a[2]) + (a[0]*a[0]))
        puts("YES");
      else
        puts("NO");
    }
    
    return 0;
}