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

int main()
{
	char line[128];
	char l[128];
	double r[128];
	
	while (fgets(line, 128, stdin) != NULL){
		double length;
		int n = 0;
		
		int p = 0;
		sscanf(&line[p], "%lf", &length);
		sscanf(&line[p], "%s", l);
		p += strlen(l);
		
		while (line[p + 1] != '\0'){
			sscanf(&line[p], "%lf", &r[n++]);
			sscanf(&line[p], "%s", l);
			p += strlen(l) + 1;
		}
		
		bool f = false;
		for (int k = 0; k <= 1 && f == false; k++){
			for (int i = 0; i < n - 1; i++){
				int m = i;
				for (int j = i + 1; j < n; j++){
					if ((i + k) % 2 == 0 && r[m] > r[j]){
						m = j;
					}
					else if ((i + k) % 2 == 1 && r[m] < r[j]){
						m = j;
					}
				}
				
				swap(r[i], r[m]);
			}
			
			for (int i = 0; i < n; i++){
//				printf("%lf\n", r[i]);
				
				if (i == 0){
					length -= r[i];
				}
				else {
					length -= sqrt((r[i] + r[i - 1]) * (r[i] + r[i - 1]) - (r[i] - r[i - 1]) * (r[i] - r[i - 1]));
				}
			}
			
			length -= r[n - 1];
			
//			printf("%lf\n", length);
			
			if (length >= 0.0){
				f = true;
			}
		}
		
		if (f){
			puts("OK");
		}
		else {
			puts("NA");
		}
	}
	return 0;
}