{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import           Control.Monad (replicateM)
import           Data.List     (sort)
import           Debug.Trace
main :: IO ()
main = print =<< solve <$> getInput

getInput :: IO (Int, Int, [(Int, Int)])
getInput = do
  [n, h] <- readInts
  abs <- replicateM n readInt2
  return (n, h, abs)

readInts = map read . words <$> getLine

readInt2 = do
  [a, b] <- readInts
  return (a, b)

solve (n, h, abs) = nAttack + mAttack
  where maxA = maximum $ map fst abs
        (nAttack, restHP) = throwAttack maxA (map snd abs) h
        mAttack = swingAttack maxA restHP

throwAttack :: Int -> [Int] -> Int -> (Int, Int)
throwAttack a bs h = if null rest
                       then (length throwns, h - last throwns)
                       else (length throwns + 1, h - head rest)
  where powerfulBs = filter (> a) bs
        (throwns, rest) = span (< h) . sort $ scanl1 (+) powerfulBs

swingAttack a h
  | h <= 0   = 0
  | otherwise = ceiling $ fromIntegral h / fromIntegral a
