import java.io.InputStream
import java.io.BufferedReader

fun main(args: Array<String>) {
  val inputStream = System.`in`
  val reader = inputStream.bufferedReader()
  val x = reader.readLine()!!
  for(i in IntRange(1,Integer.parseInt(x))) {
    val s = reader.readLine()!!
    val e = s.split(' ').map{ Integer.parseInt(it) }
                        .map{ z -> z*z }
                        .sorted()
    if(e[0]+e[1] == e[2]) println("YES")
    else println("NO")
  }
}
