#include <iostream>
#include <stdlib.h>
#include "string"
#include <math.h>

using namespace std;


int main(){
    int a,b,c;
    int N;
    string *str;
    
    cin >> N;
    
    str=(string *)malloc(sizeof(string)*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)))) str[i]="YES";
        else str[i]="NO";
    }
    
    for(int i=0;i<N;i++) cout<<str[i]<<endl;
    
    free(str);
    
    return 0;
}