#include<stdio.h>
  
void right_triangle(int x, int y, int z);
  
int main(void)
{
    int n;
    scanf("%d", &n);
    int x, y, z;
    for (int i = 0; i<n; i++) {
        scanf("%d %d %d", &x, &y, &z);
        right_triangle(x, y, z);
    }
    return 0;
}
  
void right_triangle(int x, int y, int z)
{
    int i = x * x;
    int j = y * y;
    int k = z * z;
    if (i == j + k || j == k + i || k == i + j) {
        printf("YES\n");
    } else {
        printf("NO\n");
    }
}