#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <list>
#include <map>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define SUPrl 13
#define UNDEFCHAN 1145

int rl;
int rs[SUPrl];
int L;
double memf[1<<SUPrl][SUPrl];

void resetf(){
	FOR(s,0,1<<rl) FOR(ri,0,rl) memf[s][ri]=UNDEFCHAN;
}

double f(int s, int ri){			//min_({a0,a1,..ri}=s) (sqrt(a0)-sqrt(a1))^2 + (sqrt(a1)-sqrt(a2))^2 + ..ri))^2
	if(memf[s][ri]!=UNDEFCHAN) return memf[s][ri];
	double re=0;
	
	int a=0;
	FOR(ari,0,rl) if((s>>ari&1)==1) a++;
	
	if(a==1) re=0;
	else{
		FOR(bri,0,rl){
			if((s>>bri&1)==0) continue;
			if(bri==ri) continue;
			re = max(re, f(s-(1<<ri),bri) + pow(sqrt(rs[bri])-sqrt(rs[ri]), 2) );
		}
	}

	memf[s][ri]=re;
	return re;
}

void showf(){
	FOR(s,0,1<<rl) FOR(ri,0,rl) cout << s <<" "<< ri <<" "<< memf[s][ri]<<endl;
}

double solve(){
	double re=0;
	FOR(ri,0,rl) re = max(re,f((1<<rl)-1,ri));
	re = -re;
	FOR(ri,0,rl) re += 2*rs[ri];
	return re;
}

int main(){
	while(cin>>L){//if(!L) return 0;
		rl=0;
		while(cin.peek()!='\n'){
			cin >> rs[rl++];
		}
		resetf();
		double re = solve();
		//showf();
		if(re<=L) cout<<"OK"<<endl; else cout<<"NA"<<endl;
	}
	return 0;
}