main = do
    k <- readLn :: IO Int
    [a,b] <- map read <$> (words <$> getLine) :: IO [Int]
    if (a `mod` k) == 0
        then putStrLn "OK"
        else if (a `div` k) /= (b `div` k)
            then putStrLn $ "OK"
            else putStrLn $ "NG"