#include <iostream>
#include <cmath>
#include <string>

typedef struct _Data {
    int side1;  // Side of triangle
    int side2;  // Side of triangle
    int side3;  // Side of triangle
} Data;

typedef struct _DataList {
    Data data[1000];                    // The sides of the triangle
    std::string isRightTriangle[1000];  // Whether it is a right triangle or not
    int effectCount;                    // The number of data
} DataList;

class RightTriangle {
public:
    RightTriangle();
    // RightTriangle(const RightTriangle& old);
    // ~RightTriangle();

    bool Run();

private:
    bool ReadLine();
    bool Calc();
    void Show() const;

private:
    DataList m_DataList;
};

RightTriangle::RightTriangle()
{
    m_DataList = { 0 };
}

bool RightTriangle::Run()
{
    // Ignore return value
    (void) ReadLine();
    (void) Calc();
    Show();

    return true;
}

bool RightTriangle::ReadLine()
{
    unsigned int readCount = 0;

    std::cin >> readCount;
    for (int i = 0; i < readCount; ++i) {
        std::cin >> m_DataList.data[m_DataList.effectCount].side1
            >> m_DataList.data[m_DataList.effectCount].side2
            >> m_DataList.data[m_DataList.effectCount].side3;
        ++m_DataList.effectCount;
    }

    return true;

}

bool RightTriangle::Calc()
{
    for (int i = 0; i < m_DataList.effectCount; ++i) {
        if (std::pow(m_DataList.data[i].side1, 2.0) + std::pow(m_DataList.data[i].side2, 2.0) == std::pow(m_DataList.data[i].side3, 2.0)) {
            m_DataList.isRightTriangle[i] = "YES";
            continue;
        }
        m_DataList.isRightTriangle[i] = "NO";
    }

    return true;
}

void RightTriangle::Show() const
{
    for (int i = 0; i < m_DataList.effectCount; ++i) {
        std::cout << m_DataList.isRightTriangle[i] << std::endl;
    }
}

int main()
{
    RightTriangle rightTriangle;
    rightTriangle.Run();
}