solve :: Int -> Int -> Int -> String
solve k a b = if any (\x -> x `mod` k == 0) [a..b]
                 then "OK"
                 else "NG"

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