import scala.io.StdIn._

object Main {
    def main(args: Array[String]): Unit = { 
        val N: Int = readInt()
        for(i <- 0 until N) {
            val num: Seq[Int] = readLine().split(" ").map(_.toInt).sorted
            val ans: String = if(
                Math.pow(num(2), 2) == Math.pow(num(1), 2) + Math.pow(num(0), 2)
            ) "YES" else "NO"
            println(ans)
        }
    }   
}