#include <iostream>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        int a = 0; int b = 0; int c = 0;
        for (int j = 0; j < 3; j++) {
            int x; cin >> x;
            if (x > a) { c = b; b = a; a = x; }
            else if (x > b) { c = b; b = x; }
            else if (x > c) { c = x; }
        }
        if (a * a == b * b + c * c)
            cout << "YES\n";
        else
            cout << "NO\n";
    }
}