#include <bits/stdc++.h>
using namespace std;

int main() {
    
    // 1. input.
    int N;
    cin >> N;
    
    // 2. output answer.
    for(int i = 0; i < N; i++){
        int a, b, c;
        cin >> a >> b >> c;
        bool isRight = false;
        if(a * a + b * b == c * c) isRight = true;
        if(b * b + c * c == a * a) isRight = true;
        if(c * c + a * a == b * b) isRight = true;
        if(isRight) cout << "YES" << endl;
        else        cout << "NO"  << endl;
    }
    
    return 0;
    
}
