#define _CRT_SECURE_NO_WARNINGS
#include"bits/stdc++.h"
#ifdef _DEBUG
#define DBG(n) n
#else
#define DBG(n)
#endif
#define INF            1e9
#define INFLL          1e18
#define EPS            1e-9
#define REP(i,n)       for(ll i=0,i##_len=(n);i<i##_len;++i)
#define REP1(i,n)      for(ll i=1,i##_len=(n);i<=i##_len;++i)
#define REPR(i,n)      for(ll i=(n)-1;i>=0;--i)
#define REPR1(i,n)     for(ll i=(n);i>0;--i)
#define REPC(i,obj)    for(auto i:obj)
#define ALL(obj)       (obj).begin(),(obj).end()
#define SETP(n)        cout<<fixed<<setprecision(n)
#define VV(T,h,w)      move(vector<vector<T>>(h,vector<T>(w)))
#define VVI(T,h,w,i)   move(vector<vector<T>>(h,vector<T>(w,i)))
using namespace std;
using ll = long long;
template<typename T, ll h, ll w>using vec2 = vector<vector<T>>;
template<typename T = ll>inline T in() { T ret; cin >> ret; return ret; }

vector<ll>r;
vector<vector<double>>dp;
ll w;
unsigned n;
void init(const string&str)
{
	r.clear();
	stringstream ss(str);
	ss >> w;
	ll foo; while (ss >> foo)r.push_back(foo);
	n = r.size();
	dp = VVI(double, 1 << n, n, -1);
}
double pack(unsigned state, ll lastcake)
{
	if (state == (1 << n) - 1) return r[lastcake];
	else if (dp[state][lastcake] != -1)return dp[state][lastcake];
	else {
		double ret = INFLL;
		REP(i, n) {
			if ((state >> i & 1) == 0) {
				if (state == 0)ret = min(ret, r[i] + pack(state | (1 << i), i));
				else ret = min(ret, pack(state | (1 << i), i) + 2 * sqrt(r[lastcake] * r[i]));
			}
		}
		return dp[state][lastcake] = ret;
	}
}
signed main()
{
	string str;
	while (getline(cin, str)) {
		init(str);
		cout << (pack(0, 0) <= w ? "OK" : "NA") << endl;
	}
}
