#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <list>
#include <cmath>
#include <fstream>
#include <queue>
#include <sstream>
#include <algorithm>
#include <cstring>
using namespace std;

template <class T> void change(T &a, T &b)// 交&#25442;
{
	T temp;
	temp = a;
	a = b;
	b = temp;
}
template <class T> void quicksort(vector<T> &S,int a,int b) // 快速排序
{
     int x = a;
	 int y = b;
	 T mid = S[(a+b)>>1];
     while (x <= y)
     {
           while (S[x] < mid) x++;
           while (S[y] > mid) y--;
           if (x <= y)
           {
              change(S[x], S[y]);
              x++;
              y--;
           }
     }
     if (x < b) quicksort(S, x, b);
     if (y > a) quicksort(S, a, y);
}

int main()
{
	vector<int> v(3);
	int ncase;
	cin >> ncase;
	while(ncase--)
	{
		cin >> v[0] >> v[1] >> v[2];
		quicksort(v,0,2);
		bool flag = (v[0]*v[0] + v[1]*v[1] == v[2]*v[2]);
		cout << (flag? "YES" :"NO") << endl;
	}
	return 0;
}