#include <iostream>                                             
#include <cmath>                                                
#include <queue>                                                
using namespace std;                                            
                                                                
int main() {                                                    
  int N;                                                        
  cin >> N;                                                     
  priority_queue<int> data;                                     
  while (N--) {                                                 
    int a, b, c;                                                
    cin >> a >> b >> c;                                         
    data.push(a);                                               
    data.push(b);                                               
    data.push(c);                                               
    a = data.top();                                             
    data.pop();                                                 
    b = data.top();                                             
    data.pop();                                                 
    c = data.top();                                             
    data.pop();                                                 
    if (pow(a,2)==pow(b,2)+pow(c,2)) {                          
      cout << "YES" << endl;                                    
    } else {                                                    
      cout << "NO" << endl;                                     
    }                                                           
  }                                                             
  return 0;                                                     
}                                                               
                  