#include<cstdio>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<sstream>
#include<iostream>
using namespace std;
int main(){
    string input;
    while(getline(cin,input)){
        stringstream ss(input);
        double L;ss>>L;
        int n=0;double r[12];
        while(ss>>r[n])n++;
        for(int i=0;i<n;i++)cout<<r[i]<<" ";cout<<endl;
        double len[12][12];
        for(int i=0;i<n;i++){
            for(int j=0;j<12;j++){
                len[i][j]=sqrt((r[i]+r[j])*(r[i]+r[j])-(r[i]-r[j])*(r[i]-r[j]));
            }
        }
        int perm[12];for(int i=0;i<n;i++)perm[i]=i;
        double mi=100000000;
        do{
            double sum=0;
            for(int i=0;i<n-1;i++)sum+=len[perm[i]][perm[i+1]];
            sum+=r[perm[0]];
            sum+=r[perm[n-1]];
            mi=min(mi,sum);
        }while(next_permutation(perm,perm+n));
        if(mi<=L)puts("OK");
        else puts("NA");
    }
    return 0;

    return 0;
}