#include <stdio.h>
#include <limits.h>
#include <math.h>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) static_cast<bitset<16> >(x);
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)
#define if_range(x, y, w, h) if (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))

const int INF = 100000000;
typedef double D;
const double EPS = 1e-8;
const double PI = 3.14159;
int dx[4]={-1, 0, 1, 0}, dy[4]={0, -1, 0, 1};
using namespace std;
typedef pair<int, int> P;

/** Problem0120 : Patisserie **/
const int MAX_N = 12;

double W;
vector<double> size;
double dp[1<<MAX_N][MAX_N];
int N;

int sig(double a, double b) {
	if(a < b - EPS) return -1;
	if(a > b + EPS) return +1;
	return 0;
}

double rec(int S, int v)
{
	//printf("(S, v, w) = (%d, %d, %.2f)\n", S, v, w);
	
	if (dp[S][v]>=0)
		return dp[S][v];
	
	if (S==(1<<N)-1) {
		return dp[S][v] = size[v];
	}
	
	double res=INF;
	rep(u, N) {
		if (!(S>>u&1)) {
			double d = sqrt((size[u]+size[v])*(size[u]+size[v]) - (size[u]-size[v])*(size[u]-size[v]));
			res  = min(res, rec(S|1<<u, u)+d);
		}
	}
	
	return dp[S][v] = res;
}

int main()
{
	string in;
	while (getline(cin, in)) {
		size.clear();
		
		stringstream ss(in);
		ss>>W;
		double d;
		while (ss>>d) {
			size.push_back(d);
		};
		N=(int)size.size();
		
		memset(dp, -1, sizeof(dp));
			
		double ans=INF;
		rep(i, N) {
			ans = min(ans, rec(1<<i, i)+size[i]);
		}
		//cout << ans << " " << W << endl;
		cout << (sig(ans, W)!=1?"OK":"NA") << endl;
	}
}