#include<cstdio>
#include<algorithm>
#include<cmath>

using namespace std;

int main(){
        int  d ,i;
        int a[1000] = {0};
        int b[1000] = {0};
        int c[1000] = {0};
        bool ans[1000];
        scanf("%d", &d);
        for(i = 0; i < d; i++){
                scanf("%d%d%d", &a[i], &b[i], &c[i]);
                ans[i] = false; 
                if(a[i] * a[i] + b[i] * b[i] == c[i] * c[i])
                        ans[i] = true;
                if(b[i] * b[i] + c[i] * c[i] == a[i] * a[i])
                        ans[i] = true;
                if(c[i] * c[i] + a[i] * a[i] == b[i] * b[i])
                        ans[i] = true;
                printf("%s\n", ans[i] ? "YES" : "NO");
        }
        return 0;
}
 