#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

void update(double& a, double b){
    a = min(a, b);
}

int main()
{
    vector<vector<double> > x(11, vector<double>(11));
    for(int i=3; i<=10; ++i){
        for(int j=3; j<=i; ++j){
            x[i][j] = x[j][i] = sqrt(pow(i+j, 2.0) - pow(i-j, 2.0)); 
        }
    }

    for(;;){
        string s;
        if(!getline(cin, s))
            return 0;
        istringstream iss(s);
        int w;
        iss >> w;
        vector<int> r;
        for(;;){
            int a;
            if(!(iss >> a))
                break;
            r.push_back(a);
        }
        int n = r.size();

        vector<vector<double> > dp(1<<n, vector<double>(11, w+1));
        for(int i=0; i<n; ++i)
            dp[1<<i][r[i]] = r[i];

        for(int i=0; i<(1<<n); ++i){
            bitset<12> bs(i);
            for(int j=0; j<n; ++j){
                if(bs[j])
                    continue;
                bitset<12> bs1 = bs;
                bs1[j] = true;
                for(int k=3; k<=10; ++k)
                    update(dp[bs1.to_ulong()][r[j]], dp[bs.to_ulong()][k] + x[k][r[j]]);
            }
        }

        bool ok = false;
        for(int i=3; i<=10; ++i){
            if(dp[(1<<n)-1][i] + i <= w)
                ok = true;
        }
        if(ok)
            cout << "OK" << endl;
        else
            cout << "NA" << endl;
    }
}