#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
using namespace std;

#define MAX 12

double sqs[MAX][MAX] = {{0,}};

class Cake{
public:
	Cake():r(0),used(false){};
	int r;
	bool used;
	bool operator<(const Cake &t) const{
		return r < t.r;
	}
};

bool check(int p[], int n, int w){
	double t = 0;

	t += p[0];
	for(int i = 0; i < n-1; i++){
		t += 2.0*sqrt((double)p[i]*p[i+1]);
	}
	t += p[n-1];

	return t <= w;
}

bool solve2(int p[], int pos, int w, Cake cakes[], int n, bool greater){
	if( pos == n ){
		return check(p,n,w);
	}else{
		for(int i = 0; i < n; i++){
			if( (greater ? p[pos-1] <= cakes[i].r : p[pos-1] >= cakes[i].r) && !cakes[i].used ){
				p[pos] = cakes[i].r;
				cakes[i].used = true;
				if( solve2( p, pos+1, w, cakes, n, !greater) ) return true;
				cakes[i].used = false;
			}
		}
		return false;
	}
}

bool solve(int p[], int n, int w, int r[]){
	/*
		High Speed but not alphameric order.
		genperm1 from http://www5.airnet.ne.jp/tomy/cpro/pe1.htm (C) Tomy
	*/
	double tw;
	int *c,*pc,*q,k,t;

	c = new int[n];
	for(k=1,q=p,pc=c;k<=n;)*q++=*pc++=k++;k=1;pc=c;
	do{t=*(p+k);*(p+k)=*(q=p+((k&1)?*pc:0));*q=t;
	
	//TODO
	tw = r[0] + 2.0 * sqs[r[0]][r[p[0]+1]];
	for(int i = 0; i < n-1; i++){
		tw += 2.0 * sqs[ r[p[i]+1] ][ r[p[i+1]+1] ];
	}
	tw += r[1] + 2.0 * sqs[ r[1] ][ r[p[n-1]+1] ];
	if( tw <= w ){
		//cout << tw << endl;
		delete [] c;
		return true;
	}
	
	k=1;pc = c;while(*pc==0)*pc++=k++;(*pc)--;}while(k<n);

	delete [] c;
	return false;
}

int main(void){
	for(int i = 1; i < sizeof(sqs)/sizeof(*sqs); ++i){
		for(int j = 1; j < sizeof(*sqs)/sizeof(**sqs); ++j){
			sqs[i][j] = sqrt((double)i * j);
		}
	}
	while(true){
		int w;
		int tmp = 0;
		int num = 0;
		int p[MAX];
		Cake cakes[MAX];
		
		cin >> w;
		if( cin.eof() ) break;
		while( true ){
			cin >> cakes[num].r;
			num++;
			if( '\n' == cin.get() ) break;
		}

		for(int i = 0; i < num; i++){ tmp += cakes[i].r; }
		if( tmp > w ){
			cout << "NA\n";
			continue;
		}

		sort(cakes,cakes+num);
		
		p[0] = cakes[0].r;
		cakes[0].used = true;
		if( solve2(p, 1, w, cakes, num, true) ){
			cout << "OK\n";
		}else{
			cout << "NA\n";
		}
	}
	return 0;
}