#include <iostream>
#include <string>
#include <vector>
#include <cstring>
#include <climits>
#include <algorithm>
#include <map>

using namespace std;

int main() {
    int N;
    cin >> N;
    
    int a, b, c;
    for (int i=0; i<N; i++) {
        cin >> a >> b >> c;
        if (b > c) swap(b, c);
        if (a > c) swap(a, c);
        cout << (c*c == a*a+b*b ? "YES" : "NO") << endl;
    }
    return 0;
}