import scala.io.StdIn._
import scala.math._

object Main {
  def checkRightTriangle(n: Int, l: List[String] = Nil): List[String] = {
    if (n > 0) {
      val Array(x1, x2, x3) = readLine().split(" ").map(_.toInt)
      if (pow(x1, 2) + pow(x2, 2) == pow(x3, 2)) checkRightTriangle(n - 1, l :+ "YES")
      else checkRightTriangle(n - 1, l :+ "NO")
    } else l
  }

  def main(args: Array[String]): Unit = {
    val inputNum = readInt()
    checkRightTriangle(inputNum).foreach(println)
  }
}