#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#define MAX_N 12
#define INF 10000
using namespace std;
vector<int> cakes;
double d[MAX_N][MAX_N];
double dp[1 << MAX_N][MAX_N];

void calc_dist(){
    for (int i = 0; i < cakes.size() - 1; i++) {
        for (int j = i + 1;  j < cakes.size(); j++) {
            double dist = sqrt(pow(cakes[i] + cakes[j], 2) - pow(cakes[i] - cakes[j], 2));
            d[i][j] = d[j][i] = dist;
        }
    }
}

double solve(){
    int n = cakes.size();
    for (int s = 0; s < 1 << MAX_N; s++) {
        for (int j = 0; j < MAX_N; j++) {
            dp[s][j] = INF;
        }
    }
    
    dp[(1 << n) - 1][0] = 0;
    
    for (int s = (1 << n) - 2; s >= 0; s--) {
        for (int v = 0; v < n; v++) {
            for (int u = 0; u < n; u++) {
                if (!(s >> u & 1)) {
                    dp[s][v] = min(dp[s][v], dp[s | 1 << u][u] + d[u][v]);
                }
            }
        }
    }
    return dp[0][0];
}


int main()
{
    int len, r;

    while (cin >> len) {

        cakes.clear();
        while (cin >> r) {
            if (cin.peek() == '\n') {
                break;
            }
            cakes.push_back(r);
        }
        for (int i = 0; i < cakes.size(); i++) {
            d[i][i] = 0;
        }
        calc_dist();
        if (solve() <= len){
            cout << "OK" << endl;
        }else{
            cout << "NG" << endl;
        }
    }

    return 0;
}