#include <bits/stdc++.h>
using namespace std;

#define double float

struct State {
	double length;
	int done, last;
	State(double a, int b, int c) : length(a), done(b), last(c) {}
	bool operator < (const State &t) const {
		return length > t.length;
	}
};

int main()
{
	string str;
	while (getline(cin, str)){
		stringstream ss(str);
		int length = -1;
		vector<int> v;
		while (!ss.eof()){
			int tmp;
			ss >> tmp;
			if (~length) v.push_back(tmp);
			else length = tmp;
			ss.ignore();
		}
		
		int n = v.size();
		vector<vector<double> > d(12, vector<double>(1 << n, 1e100));
		bool res = false;
		priority_queue<State> que;
		for (que.push(State(0.0, 0, -1)); que.size(); que.pop()){
			State st = que.top();
			if (d[st.last + 1][st.done] < st.length) continue;
			d[st.last + 1][st.done] = st.length;
			if (st.done == (1 << n) - 1){
				//printf("%f\n", st.length + v[st.last]);
				if (st.length + v[st.last] <= length) res = true;
				else continue;
			}
			
			for (int i = 0; i < n; i++){
				int x = 1 << i;
				if (st.done & x) continue;
				
				double nlen = st.length;
				if (~st.last){
					nlen += sqrt((v[st.last] + v[i]) * (v[st.last] + v[i]) - (v[st.last] - v[i]) * (v[st.last] - v[i]));
				}
				else {
					nlen += v[i];
				}
				int ndone = st.done | x;
				que.push(State(nlen, ndone, i));
			}
		}
		puts(res ? "OK" : "NA");
	}
	return 0;
}