#include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
using namespace std;
//kaewasuretyuui
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<double> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<vp> vvp;
typedef pair<int,pii> pip;
typedef vector<pip>vip	;
const double PI=acos(-1);
const double EPS=1e-8;
const int inf=1<<30;
int l;
vi split(string s){
	stringstream ss(s);//ss<<s;
	vi vec;
	for(int i=0;!ss.eof();i++){
		int t;ss>>t;
		if(i==0)l=t;
		else vec.pb(t);
	}
	return vec;
}
double f(double a,double b){
	return sqrt(a*a-b*b);
}
int main(){
	string s;
	while(getline(cin,s)){
		vi in=split(s);
		int n=in.size();
		int N=1<<n;
		vector<vector<double> >dp(N,vector<double>(n,inf));
		rep(i,n)dp[1<<i][i]=in[i];
		vvi cost(n,vi(n));
		rep(i,n)rep(j,n)cost[i][j]=f(in[i]+in[j],in[i]-in[j]);
		rep(i,N)rep(j,n)if(i&1<<j){
			rep(k,n)if(!(i&1<<k)){
				dp[i|1<<k][k]=min(dp[i|1<<k][k],dp[i][j]+cost[j][k]);
			}
		}
		double mi=inf;
		rep(i,n)mi=min(mi,dp[N-1][i]+in[i]);
		if(mi<EPS+l)cout<<"OK"<<endl;
		else cout<<"NA"<<endl;
	}
}