toInt :: String -> Int
toInt = read :: String -> Int

main = do
  k <- toInt <$> getLine
  [a, b] <- map toInt . words <$> getLine
  putStrLn $ if length (filter (\x -> mod x k == 0) [a..b]) > 0 then "OK" else "NG"
