#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main(void){
    int line_num, i;
    vector<int> arr;
    arr.resize(3);
    cin >> line_num;
    for(i = 0; i < line_num; i++){
        cin >> arr[0] >> arr[1] >> arr[2];
        sort(arr.begin(), arr.end());
        if(arr[0]*arr[0]+arr[1]*arr[1] == arr[2]*arr[2]){
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
}