#include <iostream>
#include <vector>
#include <set>
#include <sstream>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
typedef long long LL;
#define OFFSET 2

int box_width;
set<LL> done;

double dist(int r1, int r2)
{
	double a = pow(abs(r1 - r2), 2);
	double b = pow(r1 + r2, 2);
	return sqrt(-a + b);
}

bool solve(vector<int> cakes, LL state)
{
	if (cakes.empty()) {
		// calculate the length
		double length = 0;
		int prev = 0;
		int save_state = state;
		do {
			int current = state % 10 + OFFSET;
			state /= 10;
			if (prev) {
				length -= prev;
				length += dist(prev, current);
				length += current;
			} else {
				length += current * 2;
			}
			prev = current;
		} while (state);
		// cout << "state: " << save_state << ", length: " << length << endl;
		if (length <= box_width) {
			return true;
		} else {
			return false;
		}
	}

	if (done.find(state) != done.end()) {
		return false;
	}
	done.insert(state);

	for (int i = 0; i < cakes.size(); ++i) {
		vector<int> next_cakes = cakes;
		int cake = next_cakes[i];
		LL next_state = state * 10 + (cake - OFFSET);
		next_cakes.erase(next_cakes.begin() + i);
		if (solve(next_cakes, next_state)) {
			return true;
		}
	}

	return false;
}

int main()
{
	while (cin >> box_width) {
		string line;
		stringstream ss;
		vector<int> cakes;
		getline(cin, line);
		ss << line;
		int r;
		while (ss >> r) {
			cakes.push_back(r);
		}

		done.clear();
		if (solve(cakes, 0)) {
			cout << "OK" << endl;
		} else {
			cout << "NA" << endl;
		}
	}
}