#include<bits/stdc++.h>
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3f
#define EPS (1e-10)
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<int, int>P;

double dp[1 << 15][30];
int r[10];
int main() {
	string s;
	while (getline(cin, s)) {
		stringstream buf(s);
		double w; buf >> w;
		int p = 0; while (buf >> r[p++]); p--;
		fill(dp[0], dp[1 << 10], INF);
		rep(i, p)dp[1 << i][r[i]] = r[i] * 2;
		rep(i, 1 << p) {
			rep(k, 11) {
				rep(j, p) {
					if (i >> j & 1)continue;
					double d = sqrt((k + r[j])*(k + r[j]) - (k - r[j])*(k - r[j])) - k + r[j];
					dp[i | 1 << j][r[j]] = min(dp[i | 1 << j][r[j]], dp[i][k] + d);
				}
			}
		}
		rep(i, 11) {
			if (dp[(1 << p) - 1][i] <= w) {
				puts("OK"); goto g;
			}
		}
		puts("NA");
	g:;
	}
}