#include<stdio.h>

int main(){
        int i = 0;
        int tmp;
        int n,len[3];
        scanf("%d",&n);
        while(i != n){
                scanf("%d %d %d",&len[0],&len[1],&len[2]);
                if(len[0] > len[1]){
                        tmp = len[0];
                        len[0] = len[1];
                        len[1] = tmp;
                }
                
                if(len[1] > len[2]){
                        tmp = len[1];
                        len[1] = len[2];
                        len[2] = tmp;
                }
                if(len[0] * len[0] + len[1] * len[1] == len[2] * len[2]){
                        printf("YES\n");
                }else{
                        printf("NO\n");
                }
                i++;
        }
        return 0;
}