#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <cmath>

#define MAX 12

using namespace std;

vector<int> split(const string &str, char delim){
    istringstream iss(str); string tmp; vector<int> res;
    while(getline(iss, tmp, delim)) {
        int i;
        std::istringstream iss(tmp);
        iss >> i;
        res.push_back(i);
    }
    return res;
}

float d[MAX][MAX];
float dp[1 << MAX][MAX];
int size;

float rec(int S, int v) {
    if (dp[S][v] >= 0) return dp[S][v];

    if (S == (1 << size) -1 && v == 0) {
        return dp[S][v] = 0;
    }

    float res = 99999;
    for (int u = 0; u < size; u++) {
        if(!(S >> u & 1))
            res = min(res, rec(S | 1 << u, u) + d[v][u]);
    }

    return dp[S][v] = res;
}


int main(int argc, char const* argv[])
{
    string line;
    while(getline(cin, line)) {

        vector<int> params = split(line, ' ');
        vector<int> cakes;

        int weight = params.front();
        for (vector<int>::iterator it = params.begin(); it != params.end(); it++) {
            if(it == params.begin()) {weight = *it; continue;}
            cakes.push_back(*it);
        }

        size = cakes.size();
        for (int i = 0; i < size; i++) {
            for (int j = i; j < size; j++) {
                int i_r = cakes.at(i);
                int j_r = cakes.at(j);
                float sq = sqrt(pow(i_r + j_r, 2.0) - pow(i_r - j_r, 2.0));
                if (i_r == j_r) sq = i_r + j_r;
                d[i][j] = sq;
                d[j][i] = sq;
            }
        }

        memset(dp, -1, sizeof(dp));

        float min_val = 99999;
        for (int i = 0; i < size; i++) {
            float rec_val = rec(0,i);
            if (rec_val == 0) continue;
            min_val = min(rec_val, min_val);
        }

        if (min_val > weight) {
            std::cout << "NA" << std::endl;
        } else {
            std::cout << "OK" << std::endl;
        }


    }
    return 0;
}