#include <bits/stdc++.h>
#define INF 1e9
using namespace std;

int getNum(string a,int &i){
  int res=0;
  while(isdigit(a[i]))res=res*10+a[i++]-'0';
  return res;
}

double getx(double R,double r){return sqrt((R+r)*(R+r)-(R-r)*(R-r));}


int n;
vector<double> num;
double mem[11][11][1<<12];
int used[11][11][1<<12];
double dfs(int l,int r,int sta){
  if(sta==(1<<n)-1)return 0;
  if(used[l][r][sta]++)return mem[l][r][sta];

  double res=INF;
  for(int i=0;i<n;i++){
    if((sta&(1<<i)))continue;
    double lcost=num[i]+getx(l,num[i])-l;
    double rcost=num[i]+getx(num[i],r)-r;
    res=min(res,lcost+dfs(num[i],r,sta|(1<<i)));
    res=min(res,rcost+dfs(l,num[i],sta|(1<<i)));
  }
  return mem[l][r][sta]=res;
}

int main(){
  string str;
  while(getline(cin,str)){
    int w,idx=0;
    w = getNum(str,idx);
    num.clear();
    while(idx++<str.size())num.push_back(getNum(str,idx));
    n = num.size();
    memset(used,0,sizeof(used));
    double mn=INF;
    for(int i=0;i<n;i++)mn=min(mn,2*num[i]+dfs(num[i],num[i],1<<i));
    cout<<(dfs(0,0,0)<=w? "OK":"NA")<<endl;
  }
  return 0;
}