n, h, *k = list(map(int, open(0).read().split()))



a = 0; b = []

for i, j in zip(*[iter(k)]*2):

    a = max(a, i)

    b.append(j)

b = sorted(b, reverse = True)



ans = 0

while ans < n and b[ans] > a and h > 0:

    h -= b[ans]

    ans += 1



if h > 0: ans += (h + a - 1) // a

print(ans)
n, h, *k = list(map(int, open(0).read().split()))

a = max(k[::2]); b = sorted(k[1::2], reverse = True)



ans = 0

while ans < n and b[ans] > a and h > 0:

    h -= b[ans]

    ans += 1

if h > 0: ans += (h + a - 1) // a

print(ans)
n, h, *k = list(map(int, open(0).read().split()))
a = 0
b = []
for i, j in zip(*[iter(k)] * 2):
    a = max(a, i)
    b.append(j)
b = sorted(b, reverse=True)
ans = 0
while ans < n and b[ans] > a and h > 0:
    h -= b[ans]
    ans += 1
if h > 0:
    ans += (h + a - 1) // a
print(ans)

n, h, *k = list(map(int, open(0).read().split()))
a = max(k[::2])
b = sorted(k[1::2], reverse=True)
ans = 0
while ans < n and b[ans] > a and h > 0:
    h -= b[ans]
    ans += 1
if h > 0:
    ans += (h + a - 1) // a
print(ans)

-a = 0 -b = [] -for i, j in zip(*[iter(k)] * 2): -    a = max(a, i) -    b.append(j) -b = sorted(b, reverse=True) +a = max(k[::2]) +b = sorted(k[1::2], reverse=True)