object Main extends App {
  val n = readLine().toInt
  for (n <- 0 until n) {
    val Seq(a, b, c) = readLine().split(' ').map(_.toInt).sorted.toList
    println(if (a*a + b*b == c*c) "YES" else "NO")
  }
}

