from operator import itemgetter

import math



n, h = list(map(int, input().split()))

ab = []

A = 0

B = 1

maxA = 0

for i in range(n):

    ab.append(list(map(int, input().split())))

    maxA = max(maxA, ab[i][A])



ab.sort(key=itemgetter(B), reverse=True)



sumB = 0

for _ab in ab:

    sumB += _ab[B]



ans = 0

damage = 0

i = 0

while damage < h and ans < n:

    damage += max(maxA, ab[ans][B])

    ans += 1



ab.sort(key=itemgetter(A), reverse=True)



if damage < h:

    ans += math.ceil((h - damage)/ab[0][A])



print(ans)
from operator import itemgetter

import math



n, h = list(map(int, input().split()))

ab = []

A = 0

B = 1

maxA = 0

for i in range(n):

    ab.append(list(map(int, input().split())))

    maxA = max(maxA, ab[i][A])



ab.sort(key=itemgetter(B), reverse=True)



sumB = 0

for _ab in ab:

    sumB += _ab[B]



ans = 0

damage = 0

i = 0

while damage < h and ans < n:

    damage += max(maxA, ab[ans][B])

    ans += 1



if damage < h:

    ans += math.ceil((h - damage)/maxA)



print(ans)
from operator import itemgetter
import math

n, h = list(map(int, input().split()))
ab = []
A = 0
B = 1
maxA = 0
for i in range(n):
    ab.append(list(map(int, input().split())))
    maxA = max(maxA, ab[i][A])
ab.sort(key=itemgetter(B), reverse=True)
sumB = 0
for _ab in ab:
    sumB += _ab[B]
ans = 0
damage = 0
i = 0
while damage < h and ans < n:
    damage += max(maxA, ab[ans][B])
    ans += 1
ab.sort(key=itemgetter(A), reverse=True)
if damage < h:
    ans += math.ceil((h - damage) / ab[0][A])
print(ans)

from operator import itemgetter
import math

n, h = list(map(int, input().split()))
ab = []
A = 0
B = 1
maxA = 0
for i in range(n):
    ab.append(list(map(int, input().split())))
    maxA = max(maxA, ab[i][A])
ab.sort(key=itemgetter(B), reverse=True)
sumB = 0
for _ab in ab:
    sumB += _ab[B]
ans = 0
damage = 0
i = 0
while damage < h and ans < n:
    damage += max(maxA, ab[ans][B])
    ans += 1
if damage < h:
    ans += math.ceil((h - damage) / maxA)
print(ans)

-ab.sort(key=itemgetter(A), reverse=True) -    ans += math.ceil((h - damage) / ab[0][A]) +    ans += math.ceil((h - damage) / maxA)