object Main extends App {
  (1 to readInt)
    .map(_ => readLine.split(" ").map(_.toInt))
    .map(s => {
      val max = s.max
      if (s.filter(_ != max).map(_ ^ 2).sum == (max ^ 2)) "YES" else "NO"
    })
    .foreach(println)
}

