
import std.stdio, std.math, std.conv, std.algorithm, std.string, std.array;

double[12][1 << 12] dp;
int[] arr;

double search_min_length(int used, int[] rest, int last) {
  if (used == ((1 << arr.length) - 1)) return arr[last];
  if (dp[used][last] != -1) return dp[used][last];
  double res = int.max;
  foreach(int i, x; arr) {
    if (((used >> i) & 1) == 0) {
      double d = 2 * sqrt((arr[last] * arr[i]).to!double);
      res = min(res, d + search_min_length(used | (1 << i), [x] ~ rest, i));
    }
  }
  dp[used][last] = res;
  return res;
}

void main() {
  string str;
  while((str = readln.chomp).length != 0) {
    arr = str.split(" ").map!(x => x.dup.to!int).array;
    double threshold = arr.front.to!double;
    double ans = double.max;
    arr.popFront;
    foreach(ref d; dp)
      foreach(ref x; d) x = -1.0;
    foreach(int i, x; arr) {
      ans = min(ans, (search_min_length(1 << i, [x], i) + x));
    }
    writeln(threshold >= ans ? "OK" : "NA");
  }
}