object Main extends App {
  def square(a: Int) = a * a
  (1 to readInt)
    .map(_ => readLine.split(" ").map(_.toInt).sorted.reverse)
    .map(s => if (s.tail.map(square).sum == square(s.head)) "YES" else "NO")
    .foreach(println)
}
