fun intList() = readLine()?.split(" ")?.map(String::toInt) ?: TODO()
fun main(args: Array<String>) {
    val n = readLine()?.toInt() ?: return
    repeat(n) {
        val (a, b, c) = intList().sorted()
        if(a*a + b*b == c*c) {
            println("YES")
        }
        else {
            println("NO")
        }
    }
}

