#include <iostream>
#include <cstdio>
#include <queue>
using namespace std;

int main(void) {
    priority_queue<int, vector<int>, greater<int>> que;
    int num;
    cin >> num;
    for(int r = 0; r < num; r++) {
        int a, b, c;
        cin >> a >> b >> c;
        que.push(a); que.push(b); que.push(c);
        a = que.top(); que.pop(); b = que.top(); que.pop(); c = que.top(); que.pop();
        if(a * a + b * b == c * c) printf("YES\n");
        else printf("NO\n");
    }
    
    return(0);
}