#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;

double calcMin(int n, int *r)
{
	static double dp[1 << 12][12] = {0};
	static double dist[12][12];
	const double MAX = 1000000;
	
	for(int i = 0; i < n; ++i) {
		for(int j = 0; j < n; ++j) {
			double dx = r[i] + r[j], dy = abs(r[i] - r[j]);
			dist[i][j] = sqrt(dx * dx - dy * dy);
		}
	}
	
	for(int i = 0; i < (1 << n); ++i)
		for(int j = 0; j < n; ++j)
			dp[i][j] = MAX;
	for(int i = 0; i < n; ++i)
		dp[1 << i][i] = r[i];
	
	for(int i = 0; i < (1 << n); ++i) {
		for(int j = 0; j < n; ++j) {
			
			if(!(i & (1 << j)))
				continue;
				
			int prev = i & (~(1 << j));
			
			for(int k = 0; k < n; ++k) {
				
				if(!(prev & (1 << k)))
					continue;
				
				dp[i][j] = min(dp[i][j], dp[prev][k] + dist[k][j]);
			}
		}
	}
	
	double ans = MAX;
	
	for(int i = 0; i < n; ++i)
		ans = min(ans, dp[(1 << n) - 1][i] + r[i]);
		
	return ans;
}

int main()
{
	while(true) {
		
		int s, n = 0;
		int r[12];
		char c = 0;
		
		if(scanf("%d ", &s) == EOF)
			break;
			
		while(c != '\n')
			scanf("%d%c", &r[n++], &c);
		
		printf("[Debug] %d :", s);
		for(int i = 0; i < n; ++i)
			printf(" %d", r[i]);
		printf(" : %d\n", n);
			
		printf("%s\n", calcMin(n, r) <= s ? "OK" : "NA");
	}
	return 0;
}