#include<cmath>
#include<cstdio>
#include<algorithm>

using namespace std;

int r[12],n;
double tbl_sqrt[101];

// memo[stat][last] :
//  Ì¶[©çÉcakeðu¢Ä¢­B
// u¢½cakeªstat(bitÅ\»)AÅãÉu¢½cakeªlastÌÆ«ÉA
// cèÌcakeðu­ÌÉKvÈÅ¬ªmemo[stat][last]B
double memo[1<<12][12];

double solve(int stat,int last)
{
//printf("stat : %d\n",stat);
	if(memo[stat][last]>1e-6)	return memo[stat][last];

	if(stat==0)	return memo[stat][last]=r[last];

	double wmin=10000;
	for(int i=0;i<n;i++){
		if((stat&(1<<i))==0)	continue;
		stat&=~(1<<i);
		wmin=min(wmin,2*tbl_sqrt[r[last]*r[i]]+solve(stat,i));
		stat|=(1<<i);
	}
//printf("stat : %d, wmin : %.3f\n",stat,wmin);
	return memo[stat][last]=wmin;
}

int main()
{
	for(int i=1;i<=100;i++)	tbl_sqrt[i]=sqrt(i);

	int box;
	while(~scanf("%d ",&box)){
		for(n=1;;n++){
			scanf("%d",r+n-1);
			if(getchar()=='\n')	break;
		}

		for(int i=0;i<n;i++)for(int j=0;j<(1<<n);j++)memo[j][i]=0;

//printf("n=%d\n",n);
		double ans=10000;
		for(int i=0;i<n;i++){
			int stat=((1<<n)-1)&~(1<<i);
//printf("start stat : %d\n",stat);
			ans=min(ans,r[i]+solve(stat,i));
//printf("stat : %d, ans : %.3f\n",stat,ans);
		}
//printf("ans = %.5f\n",ans);
		puts(ans<=box?"OK":"NA");
	}

	return 0;
}