object Main {
  def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt
    for (i <- 0 until n){
      val ls = List.fill(3)(sc.nextInt).sorted
      if (ls(2)*ls(2) == ls(1)*ls(1) + ls(0)*ls(0)) println("YES") else println("NO")
    }
  }
}