#include <iostream>
#include <math.h>

using namespace std;


int main(){
    int a,b,c;
    int N;
    
    cin >> N;
    for(int i=0;i<N;i++){
        cin>>a>>b>>c;
        if(c==sqrt((pow((double)a,(double)2)+pow((double)b,(double)2)))) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    
    return 0;
}