#include <iostream>
#include <sstream>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
#define X first
#define Y second
#define rep(i,n) for(int i=0;i<n;i++)
vector<double> data;
pair<double,double> lc;
vector<bool> done;

double memo[1<<12][11];

int boxSize;
bool flag;

double solve(double x,double a,double b){
	return (2.0*x+sqrt(4*x*x-4*(x*x-4*a*b)) ) / 2.0;
}

void memo_view()
{
	for(int i=0;i < ( 1<<done.size() );i++){
		for(int j=0; j < done.size() ;j++){
			if(i & (1<<j) )cout << j+1 << " ";
		}
		cout << endl;
		cout << "=" << memo[i] << endl << endl;
	}
}
void bt(){
	if( count(done.begin(),done.end(),true) == done.size() ){
		if( lc.X + lc.Y <= boxSize){
			flag = true;
		}
	}
	if(flag || lc.X + lc.Y > boxSize - 1.0e-07)return;
	
	int msk = 0;
	for(int i=0;i<done.size();i++){
		if(done[i])msk += 1<<i;
	}
	if( lc.X + lc.Y >= memo[msk][(int)lc.first])return;
	memo[msk][(int)lc.first] = lc.X + lc.Y;
	for(int i=0;i<data.size();i++){
		if(done[i])continue;
		
		if(solve(lc.X,lc.Y,data[i]) > boxSize)continue;
		done[i] = true;
		pair<double,double> tmp = lc;
		lc = make_pair(solve(lc.X,lc.Y,data[i]),data[i]);
		bt();
		lc = tmp;
		done[i] = false;
	}
}


int main(){
	int t;
	string s;
	while(getline(cin,s) && s != ""){
		vector<int> input;
		flag = false;
		data.clear();
		
		stringstream ss(s);
		while(ss >> t)input.push_back(t);
		
		boxSize = input[0];
		for(int i=1;i<input.size();i++){
			data.push_back(input[i]);
		}
		sort( data.begin(),data.end(),greater<int>() );
		done.resize(data.size());
		fill(done.begin(),done.end(),false);
		rep(i,1<<12)rep(j,11)memo[i][j] = (1<<12);
		
		for(int i=0;i<data.size();i++){
			done[i] = true;
			lc = make_pair(data[i],data[i]);
			bt();
			done[i] = false;
		}

		cout << (flag?"OK":"NA") << endl;
	}
}