object Main extends App{

  val n = io.StdIn.readLine().toInt
  
  for (i <- 1 to n) {
    val sideAry = io.StdIn.readLine().split(' ').map { _.toInt }.sorted
    val a = sideAry(0) * sideAry(0)
    val b = sideAry(1) * sideAry(1)
    val c = sideAry(2) * sideAry(2)

    if (c == (a + b))
      println("YES")
    else
      println("NO")
  }
}