#include <iostream>
#include <cstdio>

int main(int argc, const char * argv[])
{
    int n, a, b, c;
    scanf("%d", &n);
    
    for (int i = 0; i < n; i++) {
        scanf("%d %d %d", &a, &b, &c);
        if (a*a + b*b == c*c) {
            printf("YES\n");
        }
        else if (b*b + c*c == a*a) {
            printf("YES\n");
        }
        else if (c*c + a*a == b*b) {
            printf("YES\n");
        }
        else
            printf("NO\n");
    }
    return 0;
}