solve :: Int -> Int -> Int -> Bool
solve a b k
    | a == b && (b `mod` k == 0) = True
    | a == b = False
    | otherwise = (a `mod` k == 0) || solve (a+1) b k

main = do
    k <- readLn
    [a,b] <- map read . words <$> getLine
    putStrLn $ if solve a b k then "OK" else "NG"
