
object Main extends App {

  import scala.io.StdIn._

  solve
  def solve: Unit = {
    val line = readLine
    if (line == null) return
    val args = line.trim.split(' ').map(_.toInt)
    println(if (args.head + 0.000000001 >= minLength(args.tail.map(Cake))) "OK"
    else "NA")
    solve
  }
  def minLength(cakes: Array[Cake]): Double = {
    val memo = Array.tabulate(1 << cakes.length){_ ⇒ Array.tabulate(cakes.length){_ ⇒ None: Option[Double]}}
    def sub(flags: Flags, last: Int): Double = {
      memo(flags.toIndex)(last) match {
        case Some(r) ⇒ r
        case None ⇒
          cakes.indices.filter(flags.isUnset).map{i ⇒
            sub(flags.set(i), i) + cakes(i).neighborPosition(cakes(last))
          }.let{s ⇒ if (s.isEmpty) cakes(last).size else s.min}.also{m ⇒ memo(flags.toIndex)(last) = Some(m)}
      }
    }
    cakes.indices.map{i ⇒ sub(Flags().set(i), i) + cakes(i).size}.min
  }
  case class Flags(flags: Int = 0) extends AnyVal {
    def set(position: Int): Flags = Flags(flags | (1 << position))
    def isSet(position: Int): Boolean = (flags & (1 << position)) != 0
    def unset(position: Int): Flags = Flags(flags & ~(1 << position))
    def isUnset(position: Int): Boolean = (flags & (1 << position)) == 0
    def toIndex: Int = flags
  }
  case class Cake(size: Int) extends AnyVal {
    def neighborPosition(right: Cake): Double = math.sqrt((size + right.size).let{it ⇒ it * it} - (size - right.size).let{it ⇒ it * it})
  }
  implicit class Extension[T](val value :T) extends AnyVal {
    @inline
    def let[A](@inline func: T ⇒ A): A = func(value)
    @inline
    def also(@inline func: T ⇒ Unit): T = {func(value); value}
  }
}
