#include <iostream>
using namespace std;

int main(void) {
    int m;
    int n; cin >> n;
    int a[3];
    for(int i = 0; i < n; i++) {
        cin >> a[0] >> a[1] >> a[2];
        m = max(max(a[0], a[1]), a[2]);
        if(m * m == (a[0] < m)*a[0]*a[0] + (a[1] < m)*a[1]*a[1] + (a[2] < m)*a[2]*a[2]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
}