object Main extends App {
  val loopCnt =  io.StdIn.readInt
  (1 to loopCnt).foreach {i=>
    val n = io.StdIn.readLine.split(' ').map { _.toInt }.sorted
    val ans = if (n(0) * n(0) + n(1) * n(1) == n(2)* n(2)) "YES" else "NO"
    println(ans)
  }
}