const int INF = 100000000;
typedef double D;
const double EPS = 1e-8;
const double PI = 3.14159;
int dx[4]={-1, 0, 1, 0}, dy[4]={0, -1, 0, 1};
using namespace std;
typedef pair<int, int> P;

/** Problem0120 : Patisserie **/
const int MAX_N = 12;

double W;
vector<double> size;
int dp[1<<MAX_N][MAX_N];
int N;

int sig(double a, double b) {
	if(a < b - EPS) return -1;
	if(a > b + EPS) return +1;
	return 0;
}

bool rec(int S, int v, double w)
{
	//printf("(S, v, w) = (%d, %d, %.2f)\n", S, v, w);
	
	if (dp[S][v]>=0)
		return dp[S][v];
	
	if (S==(1<<N)-1) {
		printf("%.2f %.2f\n", W, w);
		return dp[S][v] = (sig(W, w)!=-1);
	}
	
	bool res=false;
	rep(u, N) {
		if (!(S>>u&1)) {
			double nw = w - size[v] + size[u] + sqrt((size[u]+size[v])*(size[u]+size[v]) - (size[u]-size[v])*(size[u]-size[v]));
			res |= rec(S|1<<u, u, nw);
		}
	}
	
	return dp[S][v] = res;
}

int main()
{
	string in;
	while (getline(cin, in)) {
		size.clear();
		
		stringstream ss(in);
		ss>>W;
		double d;
		while (ss>>d) {
			size.push_back(d);
		};
		N=(int)size.size();
		
		memset(dp, -1, sizeof(dp));
			
		bool ans=false;
		rep(i, N) {
			ans |= rec(1<<i, i, 2*size[i]);
		}
		
		cout << (ans?"OK":"NA") << endl;
	}
}