#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <cctype>

#include <iostream>
#include <vector>
#include <deque>
#include <queue>
#include <map>
#include <algorithm>

using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)
#define repi(i,l,n) for(int (i)=(int)(l);(i)<(int)(n);(i)++)
#define d_arr(arr, h, w) rep(i,(h) ){ cout << "["; rep(j,(w) ) { cout << (arr)[i][j] << ", "; } cout << "]" << endl;}
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))
#define print(x) printf("%d\n",x);

#define max_cakes 12
#define INF (1<<30)

typedef pair<int ,int> P;


double dis( int l, int r){
    double sq = pow(l+r,2) - pow(fabs(l-r),2);
    return sqrt(sq);
}

vector<int> cakes;
int nCakes;
map< P,double> memo;

void show(int bit){
    rep(i,nCakes){
        if( bit>>i & 1 ) { cout << 1 << ","; }
        else { cout << 0 << ","; }
    }
    puts("");
}


double rec( int left_i, int bit ){
    //cout << "rec( left=" << cakes[left_i] << ", bit=" << bit << " )" << endl;
    //show(bit);
    if( (1<<nCakes)-1 == bit ){
        //cout << "return!!" << endl;
        return cakes[left_i];
    }

    map< pair<int ,int> ,double>::iterator it = memo.find( make_pair(left_i,bit) );
    if( it != memo.end() ){ return it->second; }
    double ret = 1000000.0;
    rep( i,nCakes ){
        //cout << "try to branch off to :" << i << endl; 
        if( (bit>>i) & 1 ) { continue; }
        else { 
            //cout << "next cakes_i:"<<i<<",next cake:"<< cakes[i]<< endl;
            //cout << "next bit:";
            //show( (1<<i)|bit );
            //puts("");
            double mem = rec(i, (1<<i) | bit );
            memo[ make_pair(i,(1<<i) | bit) ] = mem;
            double tmp = dis(cakes[left_i], cakes[i]) + mem ;
            ret = min(ret, tmp);
        }
    }
    return ret;
}

int main()
{
    while(1){
        cakes.clear();
        memo.clear();
        int length;
        cin >> length; if( length == 0 ) break;
        int tmp;
        while(1) { 
            cin >> tmp;
            cakes.push_back(tmp);
            if (cin.peek()=='\n') break;
        }
        nCakes = cakes.size();

        int bit = 0;
        double cap = 10000000.0;
        rep(i,cakes.size()){
            double scale = cakes[i] + rec(i, 1<<i );
            cap = min(cap, scale);
        }

        //cout << "length: " << length << endl;
        //cout << "cap : " << cap << endl;
        if (cap <= length) { cout << "OK" << endl; }
        else { cout << "NA" << endl; }
    }
}