#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>

using namespace std;

const double EPS = 1e-10;

main(){
  int L;
  int data[12];
  int num[12];
  for(int i=0;i<12;i++){
    num[i] = i;
  }
  while(cin >> L){
    int size;
    for(size=0;;size++){
      char c;
      scanf("%d%c", &data[size], &c);
      if(c == '\n'){
	size++;
	break;
      }
    }
    double data2[12][12];
    for(int i=0;i<size;i++){
      for(int j=0;j<size;j++){
	int a = abs(data[i] - data[j]);
	int b = data[i] + data[j];
	data2[i][j] = sqrt((double)(b*b) - (double)(a*a));
      }
    }
    sort(num, num+size);
    bool f = false;
    do{
      double length = data2[num[0]][num[size-1]];
      for(int i=0;i<size-1;i++){
	length += data2[num[i]][num[i+1]];
      }
      if(length < L || abs(length - L) < EPS){
	f = true;
	break;
      }
      //cout << length << ' ' << L << endl;
    }while(next_permutation(num, num+size));
    if(f) cout << "OK" << endl;
    else cout << "NA" << endl;
  }
  return 0;
}