#include <iostream>
#include <vector>
#include <cmath>
#include <sstream>
#include <cstring>
#include <fstream>
#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

const int MAX_N = 12+1;
const double INF = 1e+100;
double dist[10+1][10+1]; // åå¾ a ã®ã±ã¼ã­ã®ä¸­å¿ã¨åå¾ b ã®ã±ã¼ã­ã®ä¸­å¿ã¨ã®è·é¢ã
double d[MAX_N][MAX_N];
double dp[1<<MAX_N][MAX_N];
int n, w;
int a[MAX_N];

// ã±ã¼ã­éã®è·é¢ãæ±ãã
int calc (void )
{
	for (int i = 3; i <= 10; i++ )
		for (int j = 3; j <= 10; j++ )
			dist[i][j] = 2.0*sqrt ((double)i*j );
}

// çµè·¯ã®æ¥ç¶ãæ±ãã
void make (void )
{
	// åæå
	rep (i, n+1 )
		rep (j, n+1 )
				d[i][j] = INF;

	rep (i, n )
		rep (j, n )
			d[i][j] = dist[a[i]][a[j]];

	rep (i, n ){
		d[n][i] = a[i]; d[i][n] = a[i];
	} // end rep
	n++;
}

// bitDP
double solve (){

	// åæå
	rep (S, 1<<n ){
		fill (dp[S], dp[S]+n, INF );
	} // end rep

	dp[(1<<n)-1][0] = 0;
	for (int S = (1 << n ) - 2; S >= 0; S-- )
		rep (v, n ) rep (u, n )
			if (!(S >> u & 1 ) )
				dp[S][v] = min (dp[S][v], dp[S | 1 << u][u] + d[v][u] );

	return dp[0][0];
}

int main()
{
	calc ();
	string str = "";

	while (getline (cin, str ) ){
		vector <int> cake; 
		stringstream ss (str );
		ss >> w;
		int i = 0, m;
		while (ss >> m ){
			 a[i++] = m;
		} // end while
		n = i;
		make ();
		if ((double)w >= solve () ){
			printf ( "OK\n" );
		}else{
			printf ( "NA\n" );
		} // end if
	} // end loop
		
	return 0;
}