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

double dp[];

double length(int[] arr) {
  double res = arr[0];
  for(int i = 1; i < arr.length; i++) {
    res += 2 * sqrt((arr[i - 1] * arr[i]).to!double);
  }
  res += arr[$ - 1];
  return res;
}

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

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