import sys

input = sys.stdin.readline

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



A = []

A_append = A.append

B = []

B_append = B.append

for i in range(N):

    a, b = list(map(int, input().split()))

    A_append(a)

    B_append(b)



A.sort(reverse = True)

B.sort(reverse = True)



# print (A)

# print (B)



count = 0

b = 0

while b < N and B[b] > A[0] and H > 0:

    count += 1

    H -= B[b]

    b += 1

if H > 0:

    count += (H + A[0] - 1) // A[0]

print (count)

import sys

input = sys.stdin.readline



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

A = []

B = []

for _ in range(N):

    a, b = list(map(int, input().split()))

    A.append(a)

    B.append(b)



A.sort(reverse = True)

B.sort(reverse = True)



ans = 0



maxA = A[0] #複数回使える最大ダメージ

for b in B:

    if b <= maxA:

        break

    else:

        H -= b

        ans += 1

        if H <= 0:

            print (ans)

            exit()

        

ans += (H + maxA - 1) // maxA



print (ans)

import sys

input = sys.stdin.readline
N, H = list(map(int, input().split()))
A = []
A_append = A.append
B = []
B_append = B.append
for i in range(N):
    a, b = list(map(int, input().split()))
    A_append(a)
    B_append(b)
A.sort(reverse=True)
B.sort(reverse=True)
# print (A)
# print (B)
count = 0
b = 0
while b < N and B[b] > A[0] and H > 0:
    count += 1
    H -= B[b]
    b += 1
if H > 0:
    count += (H + A[0] - 1) // A[0]
print(count)

import sys

input = sys.stdin.readline
N, H = list(map(int, input().split()))
A = []
B = []
for _ in range(N):
    a, b = list(map(int, input().split()))
    A.append(a)
    B.append(b)
A.sort(reverse=True)
B.sort(reverse=True)
ans = 0
maxA = A[0]  # 複数回使える最大ダメージ
for b in B:
    if b <= maxA:
        break
    else:
        H -= b
        ans += 1
        if H <= 0:
            print(ans)
            exit()
ans += (H + maxA - 1) // maxA
print(ans)

-A_append = A.append -B_append = B.append -for i in range(N): +for _ in range(N): -    A_append(a) -    B_append(b) +    A.append(a) +    B.append(b) -# print (A) -# print (B) -count = 0 -b = 0 -while b < N and B[b] > A[0] and H > 0: -    count += 1 -    H -= B[b] -    b += 1 -if H > 0: -    count += (H + A[0] - 1) // A[0] -print(count) +ans = 0 +maxA = A[0]  # 複数回使える最大ダメージ +for b in B: +    if b <= maxA: +        break +    else: +        H -= b +        ans += 1 +        if H <= 0: +            print(ans) +            exit() +ans += (H + maxA - 1) // maxA +print(ans)