#include <bits/stdc++.h>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all(x) (x).begin(),(x).end()
#define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x))
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

#define INF 2147483600
#define long long long // for codeforces

double cake[11][11];

bool solve(int w, vector<int> &vec){
  int n = vec.size();
  vector<vector<double>> dp(1<<n, vector<double>(n, INF));
  // dp[mask][n] mask ????????£????????????vec[i]???????°????
  rep(i,n) dp[1<<i][i] = 2*vec[i];
  repl(mask,1,1<<n) rep(i,n) if(dp[mask][i]<INF){
    rep(j,n) if((mask&(1<<j))==0){
      int nmask = mask | (1<<j);
      dp[nmask][j] = min(dp[nmask][j], dp[mask][i] + cake[vec[i]][vec[j]] + vec[j] - vec[i]);
    }
  }
  rep(i,n) if(dp[(1<<n)-1][i]<=w) return true;
  return false;
}


int main(){
  repl(i,3,11) repl(j,3,11){
    double c = i+j;
    double a = i-j;
    cake[i][j] = sqrt(c*c - a*a);
  }
  string str;
  while(getline(cin, str)){
    stringstream ss;
    ss<<str;
    int w;
    ss>>w;
    vector<int> vec;
    int r;
    while(ss>>r) vec.pb(r);
    if(solve(w,vec)) cout<<"OK"<<endl;
    else cout<<"NA"<<endl;
  }

  return 0;
}