solve k a b = f list
  where
    list = filter (\n -> n `mod` k == 0) [a..b]
    f [] = "NG"
    f _ = "OK"

main = do
  k <- readLn :: IO Int
  [a,b] <- map read . words <$> getLine
  putStrLn $ solve k a b
