#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<sstream>
#include<cmath>
using namespace std;

int main()
{
	stringstream ss;
	double box=0;
	double cakes[12];

	for(int i=0;i<12;i++) cakes[i]=0;

	string in;
	while(getline(cin,in))
	{
		int i=0,j=0;
		for(i=0;in[i]!=' ';i++)
		{
			ss.clear();
			ss<<in[i];
			int a;
			ss>>a;
			box*=10;
			box+=a;
		}

		for(j=0;j<12;j++)
		{
			i++;
			for(;in[i]!=' '&&i!=in.size();i++)
			{
				ss.clear();
				ss<<in[i];
				int a;
				ss>>a;
				cakes[j]*=10;
				cakes[j]+=a;				
			}
			if(i==in.size()) break;
		}
		j++;	
		sort(cakes,cakes+j);

		bool ok=false;

		do{
			double sum=cakes[0]+cakes[1];
			for(int i=2;i<j;i++){
				if(i==2) sum=sum+2*sqrt(cakes[0]*cakes[2]);
				else sum=sum+2*sqrt(cakes[i-1]*cakes[i]);

				if(i==j-1) sum=sum+2*sqrt(cakes[i]*cakes[1]);
				else sum=sum+2*sqrt(cakes[i]*cakes[i+1]);

			}

			if(sum<=box)
			{
				//printf("%lf\n",sum);
				ok=true;
				break;
			}
		}while(next_permutation(cakes+2,cakes+j));
		if(ok) cout<<"OK"<<endl;
		else cout<<"NA"<<endl;
	}
	return 0;
}