#include<iostream>
#include<sstream>
#include<queue>
#include<cmath>
#define rep(i,n)  for(int i=0;i<n;i++)
#define INF 1<<30
using namespace std;
double c[1<<12][12],t,d[11][11]; int n,w,r[12];
int main(){
	string s; rep(i,11)rep(j,11)d[i][j]=j-i+2*sqrt(i*j);
	while(getline(cin,s)){
		stringstream ss; ss<<s; ss>>w;
		for(n=0;ss>>r[n];n++);
		queue<pair<int,int> > F;
		if(n==1){
			cout<<(r[0]<=w?"OK":"NA")<<endl;continue;
		}
		rep(i,1<<n)rep(j,n)c[i][j]=INF;
		rep(i,n)c[((1<<n)-1)^1<<i][i]=2*r[i],
		F.push(make_pair(((1<<n)-1)^1<<i,i));
		while(!F.empty()){
			int cs=F.front().first,k=F.front().second,ns; F.pop();
			rep(i,n)if(cs&1<<i){
				ns=cs^1<<i; t=c[cs][k]+d[r[k]][r[i]];
				if(c[ns][i]>t){
					c[ns][i]=t;
					if(ns==0&&t<=w){
						cout<<"OK"<<endl; goto END;
					}
					F.push(make_pair(ns,i));
				}
			}
		}
		cout<<"NA"<<endl;
		END:;
	}
	return 0;
}