import Control.Applicative ((<$>), (<*>))
import Control.Monad
import Data.List
import Test.HUnit

main :: IO ()
-- main = runTestTT (TestList tests) >> return ()
main = do
  xs <- getc $ solve . split toDbl
  mapM_ putStrLn xs

solve :: [Double] -> String
solve (x:xs)
  | (sum $ zipWith dist mxs (tail mxs)) + head mxs + last mxs > x = "NA"
  | otherwise = "OK"
  where
    sxs = sortBy (\a b -> b `compare` a) xs
    (as,bs) = splitAt (length sxs `div` 2) sxs
    mxs = merge as (reverse bs)
    
merge :: [Double] -> [Double] -> [Double]
merge [] ys = ys
merge (x:xs) (y:ys) = y:x:merge xs ys

dist :: Double -> Double -> Double
dist r1 r2 = sqrt ((r1 + r2) ^ 2 - (abs (r1 - r2)) ^ 2)

toDbl :: String -> Double
toDbl s = read s

split :: (String -> a) -> String -> [a]
split f = map f . words

getc :: (String -> a) -> IO [a]
getc f = map f . lines <$> getContents