#include <stdio.h>
#include <algorithm>
#include <string.h>
using namespace std;
int main(void)
{
    int testCase,a[4],index,i;
    scanf("%d",&testCase);
    while(testCase--){
        scanf("%d",&a[0]);
        a[0];
        index = 0;
        for(i=1;i<3;i++){
            scanf("%d",&a[i]);
            if(a[i]>a[i-1])index = i;
            a[i];
        }
        int sum1 = 0;
        int sum2 = 0;
        for(i=0;i<3;i++){
            if(i==index)sum1+=a[i]*a[i];
            else sum2 += a[i]*a[i];
        }
        if(sum1==sum2)printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}