import Data.List
import Data.Char
import Data.Maybe
import Control.Monad
import qualified Data.ByteString.Char8 as BS8

main :: IO ()
main = do
  k <- fst . fromJust . BS8.readInt <$> BS8.getLine
  [a, b] <- unfoldr (BS8.readInt . BS8.dropWhile isSpace) <$> BS8.getLine

  putStrLn $ if (not $ null [x | x <-[a..b], x `mod` k == 0]) then "OK" else "NG"
