#include<bits/stdc++.h>
using namespace std;
#define INF 10000000

int main(){
  string str;
  while(getline(cin,str)){
    vector<int> vec;
    stringstream ss(str);
    int wid,n=0;
    ss >> wid;
    while(!ss.eof()){
      int s;
      ss >> s;
      vec.push_back(s);
      n++;
    }
    double dp[(1<<n)][n];
    for(int i=0;i<(1<<n);i++){
      for(int j=0;j<n;j++){
	dp[i][j] = INF;
      }
    }
    for(int i=0;i<n;i++){
      dp[(1<<n)-1-(1<<i)][i] = vec[i];
    }
    for(int i=(1<<n)-2;i>-1;i--){
      for(int j=0;j<n;j++){
	if(!(i & (1<<j))){
	  for(int k=0;k<n;k++){
	    dp[i][j] = min(dp[i][j],dp[i | (1<<j)][k] + 2*sqrt(vec[j]*vec[k]));
	  }
	}
      }
    }
    double ans = INF;
    for(int i=0;i<n;i++){
      ans = min(ans,dp[0][i]+vec[i]);
    }
    if(ans <= wid) cout << "OK" << endl;
    else cout << "NG" << endl;
  }
  //cout << (1<<3) << endl;
}