#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main() {
	int n;
	scanf(" %d", &n);
	rep(i,n) {
		vector<int> l(3);
		rep(j,3) {
			scanf(" %d", &l[j]);
		}
		int maxl = max<int>(l[0], max<int>(l[1], l[2]));
		for(int k = 0; k < 3; k++) {
			if(l[k] == maxl) {
				l[k] = 0;
				break;
			}
		}
		int s = 0;
		rep(k, 3) {
			s += l[k] * l[k];
		}
		puts(maxl * maxl == s ? "YES" : "NO");
	}
	return 0;
}