#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>

int main(int argc,char* argv[]){
  
  while(true){
    int length;
    int cake_array[12];
    int cakes = 0;
    char c;

    if(!(std::cin >> length)){
      break;
    }
    
    while(~(c = std::getchar())){
      if(c == '\n'){
	break;
      }else if(c == ' '){
	std::cin >> cake_array[cakes];
	cakes++;
      }
    }
    
    std::sort(cake_array,cake_array+cakes);
    
    std::deque<int> list;
    
    bool flag = true;
    for(int i = 0; i < (cakes/2); i++){
      if(flag){
	list.push_front(cake_array[i]);
	list.push_back(cake_array[cakes - i - 1]);
      }else{
	list.push_front(cake_array[cakes - i - 1]);
	list.push_back(cake_array[i]);
      }

      flag = !flag;
    }
    
    if(cakes == 1){
      list.push_front(cake_array[0]);
    }else if(cakes % 2 == 1){
      if(list[0] > list[cakes-2]){
	list.push_front(cake_array[cakes/2]);
      }else{
	list.push_back(cake_array[cakes/2]);
      }
    }
    
    double sum = list[0] + list[cakes-1];
    for(int i = 0; i < (cakes - 1); i++){
      //std::cout << sum << std::endl;
      sum += 2 * std::sqrt(list[i] * list[i + 1]);
    }

    //std::cout << sum;

    std::cout << ((sum <= length) ? "OK" : "NG") << std::endl;
    
  }
  
  return 0;
  
}