#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<cassert>
#include<cstdio>

#define MAX 12

using namespace std;
long double minimumLength;
long double boxLength;

long double CalculateRoleCakesLength(const vector<int> &r){
	long double ret;
	ret = r[0] + r[r.size() - 1];
	for(unsigned int i = 0; i < r.size() - 1; ++i){
		ret += 2 * sqrt((long double)(r[i]*r[i+1]));
	}
	return ret;
}
inline void InternalInsert(vector<int> &v, unsigned int a, unsigned int dest){
	if( a > dest ){
		v.insert( v.begin() + dest, v[a] );
		v.erase( v.begin() + a + 1);
	}else if( dest > a ){
		v.insert( v.begin() + dest, v[a] );
		v.erase( v.begin() + a);
	}
}
template <typename T>
void printVector( vector<T> &v ){
	for(unsigned int i = 0; i < v.size(); ++i) cout << v[i] << ' '; cout << endl;
}
bool OptimizeArrangeOfRoleCakes(long double *result, const long double target, vector<int> &vInBoxCakes){
	long double len;
	long double minlen;
	const long double nowlen = CalculateRoleCakesLength( vInBoxCakes );
	vector<pair<int,int> > vCands;

	minlen = target;
	for(unsigned int i = 0; i < vInBoxCakes.size(); ++i){
		for(unsigned int j = 0; j <= vInBoxCakes.size(); ++j){
			if( j >= i + 2 || j <= i - 1 ){
				InternalInsert( vInBoxCakes, i, j );
				len = CalculateRoleCakesLength( vInBoxCakes );
				if( len < minlen ){
					minlen = len;
					vCands.push_back( make_pair(i, j) );
				}
				if( i < j ) InternalInsert( vInBoxCakes, j - 1, i );
				else InternalInsert( vInBoxCakes, j, i + 1 );
			}
		}
	}
	if( vCands.size() > 0 ){
		long double retminlen = nowlen;
		int retminlenind = -1;

		for(unsigned int i = 0; i < vCands.size(); ++i){
			long double t;
			InternalInsert( vInBoxCakes, vCands[i].first, vCands[i].second );

			if( OptimizeArrangeOfRoleCakes(&t, minlen, vInBoxCakes ) ) return true;
			if( t < retminlen ){
				retminlen = t;
				minimumLength = min(minimumLength, retminlen);
				if( minimumLength <= boxLength ) return true;
				retminlenind = i;
			}
			
			if( vCands[i].first < vCands[i].second ){
				InternalInsert( vInBoxCakes, vCands[i].second - 1, vCands[i].first);
			}else{
				InternalInsert( vInBoxCakes, vCands[i].second, vCands[i].first + 1 );
			}
		}
		*result = retminlen;
		return false;
	}
	*result = nowlen;
	return false;
}
int main(void){
	while(true){

		long double length = 0;
		vector<int> vInBoxCakes;
		
		cin >> boxLength;
		if( cin.eof() ) break;
		while( true ){
			int tmp;

			if( '\n' == cin.get() ) break;
			cin >> tmp;
			vInBoxCakes.push_back(tmp);
		}

		minimumLength = CalculateRoleCakesLength( vInBoxCakes );
		OptimizeArrangeOfRoleCakes( &length, minimumLength, vInBoxCakes);

		//cout << "Minmum Length = " << minimumLength << endl;
		if( minimumLength <= boxLength ) cout << "OK\n";
		else cout << "NA\n";
	}
	return 0;
}