#include <iostream>

int main()
{
    int x,a,b,c;
    std::cin >> x;
    for (int i = 0; i < x;i++){
        std::cin >> a >> b >> c;
        if ( a * a + b * b == c * c || b * b + c * c == a * a || c * c + a * a == b * b) {
            std::cout << "YES" << std::endl;
}       else  {
            std::cout << "NO" << std::endl;
}
}
    return 0;
}