#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define DBL(x) ((x)*(x))
using namespace std;

typedef unsigned int uint;
typedef long long ll;

double dp[1<<12][12];
int r[12];
int n;
int len;

double length(int flag, int last){
  if(last != -1 && dp[flag][last] != 0) return dp[flag][last];
  if(flag == 0) return r[last];

  double ret = 1e10;
  for(int i=0; i<n; i++){
    if(flag & (1 << i)){
      int r2 = r[i];
      double r3;
      if(last == -1)
        r3 = r2;
      else{
        int r1 = r[last];
        r3 = sqrt(DBL(r1+r2) - DBL(r1-r2));
      }
      double tmp = r3 + length(flag ^ (1<<i), i);
      ret = min(ret, tmp);
    }
  }
  if(last != -1) dp[flag][last] = ret;
  return ret;
}

int main(){
  string str;
  while(getline(cin, str)){
    stringstream ss(str);
    int i;
    ss>>len;
    for(i=0; ss>>r[i]; n=++i);
    memset(dp, 0, sizeof(dp));
    double l = length((1<<n)-1,-1);
    //printf("n=%d %f\n",n,l);
    puts(l <= len + 1e-10 ? "OK" : "NG");
  }
  return 0;
}