INF = 10 ** 20

def get_dist(r1, r2):

  c = r1 + r2

  b = abs(r1 - r2)

  return (c ** 2 - b ** 2) ** (1 / 2)



def minimum_width(rest, r, dic):

  if (rest, r) in dic:

    return dic[(rest, r)]

  if rest == ():

    return r



  ret = INF

  lenr = len(rest)

  for i, c in enumerate(rest):

    ret = min(ret, minimum_width(tuple(rest[j] for j in range(lenr) if i != j), rest[i], dic) + get_dist(r, rest[i]))

  dic[(rest, r)] = ret

  return ret





while True:

  try:

    lst = list(map(int, input().split()))

    w = lst[0]

    cakes = lst[1:]

    cakes.sort()

    lenc = len(cakes)

    dic = {}

    ans = INF

    for i in range(lenc):

      ans = min(ans, minimum_width(tuple(cakes[j] for j in range(lenc) if i != j), cakes[i], dic) + cakes[i])

    if w >= ans:

      print("OK")

    else:

      print("NA")

  except EOFError:

    break

INF = 10 ** 20

def get_dist(r1, r2):

  return ((r1 + r2) ** 2 - (r1 - r2) ** 2) ** (1 / 2)



def minimum_width(rest, r, dic):

  if (rest, r) in dic:

    return dic[(rest, r)]

  if rest == ():

    return r



  ret = INF

  lenr = len(rest)

  for c in rest:

    next_rest = list(rest)

    next_rest.remove(c)

    ret = min(ret, minimum_width(tuple(next_rest), c, dic) + get_dist(r, c))

  dic[(rest, r)] = ret

  return ret





while True:

  try:

    lst = list(map(int, input().split()))

    w = lst[0]

    cakes = lst[1:]

    cakes.sort()

    lenc = len(cakes)

    dic = {}

    ans = INF

    for i in range(lenc):

      ans = min(ans, minimum_width(tuple(cakes[j] for j in range(lenc) if i != j), cakes[i], dic) + cakes[i])

    if w >= ans:

      print("OK")

    else:

      print("NA")

  except EOFError:

    break

INF = 10**20


def get_dist(r1, r2):
    c = r1 + r2
    b = abs(r1 - r2)
    return (c**2 - b**2) ** (1 / 2)


def minimum_width(rest, r, dic):
    if (rest, r) in dic:
        return dic[(rest, r)]
    if rest == ():
        return r
    ret = INF
    lenr = len(rest)
    for i, c in enumerate(rest):
        ret = min(
            ret,
            minimum_width(tuple(rest[j] for j in range(lenr) if i != j), rest[i], dic)
            + get_dist(r, rest[i]),
        )
    dic[(rest, r)] = ret
    return ret


while True:
    try:
        lst = list(map(int, input().split()))
        w = lst[0]
        cakes = lst[1:]
        cakes.sort()
        lenc = len(cakes)
        dic = {}
        ans = INF
        for i in range(lenc):
            ans = min(
                ans,
                minimum_width(
                    tuple(cakes[j] for j in range(lenc) if i != j), cakes[i], dic
                )
                + cakes[i],
            )
        if w >= ans:
            print("OK")
        else:
            print("NA")
    except EOFError:
        break

INF = 10**20


def get_dist(r1, r2):
    return ((r1 + r2) ** 2 - (r1 - r2) ** 2) ** (1 / 2)


def minimum_width(rest, r, dic):
    if (rest, r) in dic:
        return dic[(rest, r)]
    if rest == ():
        return r
    ret = INF
    lenr = len(rest)
    for c in rest:
        next_rest = list(rest)
        next_rest.remove(c)
        ret = min(ret, minimum_width(tuple(next_rest), c, dic) + get_dist(r, c))
    dic[(rest, r)] = ret
    return ret


while True:
    try:
        lst = list(map(int, input().split()))
        w = lst[0]
        cakes = lst[1:]
        cakes.sort()
        lenc = len(cakes)
        dic = {}
        ans = INF
        for i in range(lenc):
            ans = min(
                ans,
                minimum_width(
                    tuple(cakes[j] for j in range(lenc) if i != j), cakes[i], dic
                )
                + cakes[i],
            )
        if w >= ans:
            print("OK")
        else:
            print("NA")
    except EOFError:
        break

-    c = r1 + r2 -    b = abs(r1 - r2) -    return (c**2 - b**2) ** (1 / 2) +    return ((r1 + r2) ** 2 - (r1 - r2) ** 2) ** (1 / 2) -    for i, c in enumerate(rest): -        ret = min( -            ret, -            minimum_width(tuple(rest[j] for j in range(lenr) if i != j), rest[i], dic) -            + get_dist(r, rest[i]), -        ) +    for c in rest: +        next_rest = list(rest) +        next_rest.remove(c) +        ret = min(ret, minimum_width(tuple(next_rest), c, dic) + get_dist(r, c))