#include <iostream>
using namespace std;
 
int main() {
    // your code goes here
    int n;
    cin >> n;
    for (int i=0;i<n;i++) {
        int a,b,c,aa,bb,cc;
        cin >> a >> b >> c;
        if (a>b&&a>c) {
            aa = a;
            bb = b;
            cc = c;
        }
        if (b>a&&b>c) {
            aa = b;
            bb = a;
            cc = c;
        }
        if (c>a&&c>b) {
            aa = c;
            bb = a;
            cc = b;
        }
         
        if (aa*aa == bb*bb + cc*cc) {
            cout << "YES" << endl;
        }
        if (aa*aa != bb*bb + cc*cc) {
            cout << "NO" <<endl;
        }
    }
    return 0;
}