import scala.io.StdIn.readLine
import scala.io.StdIn.readInt

object Main {
  def main(args: Array[String]): Unit = {
    (1 to readInt()).foreach(_ => {
      val t = readLine().split(" ").map(x => x.toInt)
      val ans = t.permutations.exists(a => a(0) * a(0) + a(1) * a(1) == a(2) * a(2))
      println(if (ans) "YES" else "NO")
    })
  }
}