#include <bits/stdc++.h>
using namespace std;
const int dx[]={0,1,0,-1,1,-1,-1,1};
const int dy[]={-1,0,1,0,1,1,-1,-1};
const int INF = 1<<30;
const int EPS = 1e-15;
#define PB push_back
#define mk make_pair
#define fi first
#define se second
#define ll long long
#define reps(i,j,k) for(int i = (j); i < (k); i++)
#define rep(i,j) reps(i,0,j)
#define MOD 1000000007
typedef pair<int,int> Pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
double memo[1<<12][12];
double dist(double a,double b){
	if(a<b)swap(a,b);
	return sqrt(((a+b)*(a+b))-((a-b)*(a-b)));
}
double search(int bit,int dep,int prev,vi cake){
	if(dep == cake.size()){
		return (double)cake[prev];
	}
	if(memo[bit][dep]){
		return memo[bit][dep];
	}
	double ret = INF;
	rep(i,cake.size()){
		if(!(bit>>i & 1)){
			if(bit == 0){
				ret = min(ret,search(bit|1<<i,dep+1,i,cake)+cake[i]);
			}
			else{
				ret = min(ret,search(bit|1<<i,dep+1,i,cake)+dist(cake[prev],cake[i]));		
			}
		}
	}
	return memo[bit][prev] = ret;
}
int main(){
	string str;
	while(getline(cin,str)){
		memset(memo,0,sizeof(memo));
		stringstream ss(str);
		vi cake;
		int tmp;
		double len;
		bool f=false;
		while(ss >> tmp){
			if(!f)len = (double)tmp;
			else cake.PB(tmp);
			f = true;
		}
		double ret = search(0,0,-1,cake);
		if(len-ret>=0.0)puts("OK");
		else puts("NA");
	}
	return 0;
}