N, H = list(map(int, input().split()))

A, B = [0]*N, [0]*N

for i in range(N):

    A[i], B[i] = list(map(int, input().split()))

target = max(A)

ans = 0

B.sort(reverse=True)

for i in B:

    if i >= target:

        H -= i

        ans += 1

    if H <= 0:

        print(ans)

        exit()

print((ans-(-H//target)))
N, H = list(map(int, input().split()))

A = [0]*N

B = [0]*N

for i in range(N):

    A[i], B[i] = list(map(int, input().split()))

a = max(A)

B.sort()

ans = 0

while len(B) > 0 and B[-1] >= a and H > 0:

    H -= B.pop()

    ans += 1

    if H <= 0:

        print(ans)

        exit()

print((ans+(-(-H//a))))
N, H = list(map(int, input().split()))
A, B = [0] * N, [0] * N
for i in range(N):
    A[i], B[i] = list(map(int, input().split()))
target = max(A)
ans = 0
B.sort(reverse=True)
for i in B:
    if i >= target:
        H -= i
        ans += 1
    if H <= 0:
        print(ans)
        exit()
print((ans - (-H // target)))

N, H = list(map(int, input().split()))
A = [0] * N
B = [0] * N
for i in range(N):
    A[i], B[i] = list(map(int, input().split()))
a = max(A)
B.sort()
ans = 0
while len(B) > 0 and B[-1] >= a and H > 0:
    H -= B.pop()
    ans += 1
    if H <= 0:
        print(ans)
        exit()
print((ans + (-(-H // a))))

-A, B = [0] * N, [0] * N +A = [0] * N +B = [0] * N -target = max(A) +a = max(A) +B.sort() -B.sort(reverse=True) -for i in B: -    if i >= target: -        H -= i -        ans += 1 +while len(B) > 0 and B[-1] >= a and H > 0: +    H -= B.pop() +    ans += 1 -print((ans - (-H // target))) +print((ans + (-(-H // a))))