#include <iostream>
#include <sstream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
#define X first
#define Y second

map<double,int> data;
pair<double,double> lc;
vector<int> input;

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 bt(int depth ){
	if(  depth == input.size()-1 ){
		if( lc.X + lc.Y<=boxSize){
			flag = true;
		}
	}
	if(flag || lc.X + lc.Y > boxSize)return;
	
	for(map<double,int>::iterator it = data.begin();it != data.end();it++){
		if( (*it).second == 0 )continue;
		//if(solve(lc.X,lc.Y,(*it).first) > boxSize)continue;
		(*it).second--;
		pair<double,double> tmp = lc;
		lc = make_pair(solve(lc.X,lc.Y,(*it).first),(*it).first);
		bt(depth+1);
		lc = tmp;
		(*it).second++;
	}
}


int main(){
	int t;
	string s;
	while(getline(cin,s) && s != ""){
		flag = false;
		data.clear();
		input.clear();
		stringstream ss(s);
		while(ss >> t)input.push_back(t);
		
		boxSize = input[0];
		for(int i=1;i<input.size();i++){
			data[input[i]]++;
		}
		
		for(map<double,int>::iterator it = data.begin();it != data.end();it++){
			(*it).second--;
			lc = make_pair((*it).first,(*it).first);
			bt(1);
			(*it).second++;
		}
		cout << (flag?"OK":"NA") << endl;
	}
}