#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <utility>
#include <cctype>
using namespace std;

#define rep(i,n) for(int (i)=0; (i)<(int)(n); ++(i))
#define foreach(c,i) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
typedef pair<int,int> P;

string in;
int L;

int main() {
  while (getline(cin, in)) {
    istringstream is(in);
    is >> L;
    vector<int> temps(20, 0), cakes;
    priority_queue<P> Q;
    int temp;
    while (is >> temp) {
      ++temps[temp];
    }
    rep(i,temps.size()) if(temps[i]) Q.push(P(temps[i], i));

    int prev_size = -1;
    while (!Q.empty()) {
      P lhs = Q.top(); Q.pop();
      if (Q.empty()) {
        rep(i,lhs.first) cakes.push_back(lhs.second);
        continue;
      }
      P rhs = Q.top(); Q.pop();
      if (prev_size != lhs.second) {
        cakes.push_back(lhs.second);
        cakes.push_back(rhs.second);
        prev_size = rhs.second;
      } else {
        cakes.push_back(rhs.second);
        cakes.push_back(lhs.second);
        prev_size = lhs.second;
      }
      if (lhs.first > 1) {
        --lhs.first; Q.push(lhs);
      }
      if (rhs.first > 1) {
        --rhs.first; Q.push(rhs);
      }
    }

    double current_length = cakes[0];
    for (int i = 0; i < cakes.size() - 1; ++i) {
      if (cakes[i] == cakes[i+1]) {
        current_length += 2 * cakes[i];
      } else {
        int larger = max(cakes[i], cakes[i+1]);
        int smaller = min(cakes[i], cakes[i+1]);
        double height = larger - smaller;
        double naname = larger + smaller;
        double width = sqrt(pow(naname, 2) - pow(height, 2));
        // printf("%lf\n", width);
        current_length += width;
      }
    }
    current_length += cakes[cakes.size() - 1];
    printf("%s\n", (L >= current_length) ? "OK": "NA");
  }
  return 0;
}