import scala.io.StdIn.{readLine,readInt}

object Main extends App {
    val n = readInt
    for(i <- 1 to n) {
      val Array(a,b,c) = readLine.split(" ").map(_.toInt).sorted
      if(a*a+b*b==c*c)
        println("YES")
      else
        println("NO")
    }
}