object Main extends App{

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

    if (sideAry(2) * sideAry(2) == (sideAry(0) * sideAry(0) + sideAry(1) * sideAry(1)))
      println("YES")
    else
      println("NO")
  }
}