#include <bits/stdc++.h>

using namespace std;

    // always declare big array here it's safer for stack than inside of main

    bool isRight(int a , int b , int c){
        a = a * a;
        b = b * b;
        c = c * c;

        return a == b + c || b == a + c || c == a + b;
    }

int main(){

         // cin.sync_with_stdio(0); to speed input but scanf and printf faster
         // cin.tie(0);             not use scanf after that and not use endl but \n

         // element before me is (i - 1) * m + m - 1

		 ios_base::sync_with_stdio(false);
		 cin.tie(NULL);
		 cout.tie(NULL);

         int n;
         cin >> n;

         while(n--){
            int x , y , z;
            cin >> x >> y >> z;

            if(isRight(x , y , z))
                cout << "YES" << endl;
            else cout << "NO" << endl;
         }

    return 0;
}

