#include <iostream>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, const char * argv[])
{
    int x1=0;
    int x2=0;
    int x3=0;
    int n=0;
    
    scanf("%d",&n);
    for(int i=0; i<n; i++){
        scanf("%d",&x1);
        scanf("%d",&x2);
        scanf("%d",&x3);
        if(x1*x1+x2*x2==x3*x3||x2*x2+x3*x3==x1*x1||x3*x3+x1*x1==x2*x2){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
}