//38
#include<iostream>
#include<string>
#include<sstream>
#include<vector>
#include<cmath>

using namespace std;

vector<int> v;

bool dfs(double r,int u,int p){
  if(1<<v.size()==u+1){
    return r>=p;
  }else{
    for(int i=0;i<v.size();i++){
      if(!(u&1<<i)){
	if(dfs(r-2*sqrt(v[i]*p),u|1<<i,v[i]))return true;
      }
    }
    return false;
  }
}

int main(){
  for(int w;cin>>w;){
    v.clear();
    string s;
    getline(cin,s);
    stringstream ss(s);
    for(int r;ss>>r;){
      v.push_back(r);
    }
    int i;
    for(i=0;i<v.size();i++){
      if(dfs(w-v[i],1<<i,v[i]))break;
    }
    cout<<((i<v.size())?"OK":"NA")<<endl;
  }
  return 0;
}