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

B=[]

A=0

for _ in range(N):

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

    A=max(A,a)

    B.append(b)

B.sort(reverse=True)

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

for i in range(N):

    H-=B[i]

    if H<=0:

        ans=min(ans,i+1)

        break

    ans=min(ans,(H-1)//A+1+i+1)

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

B=[]

A=0

for _ in range(N):

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

    A = max(A,a)

    B.append(b)

B = sorted(B, reverse=True) + [0]



i = 0

while B[i] >= A:

    i += 1

B = B[:i]



ans = 0

for i in range(len(B)):

    H -= B[i]

    ans += 1

    if H <= 0:

        print(ans)

        exit()

print((ans + (H -1)//A + 1))

N, H = list(map(int, input().split()))
B = []
A = 0
for _ in range(N):
    a, b = list(map(int, input().split()))
    A = max(A, a)
    B.append(b)
B.sort(reverse=True)
ans = (H - 1) // A + 1
for i in range(N):
    H -= B[i]
    if H <= 0:
        ans = min(ans, i + 1)
        break
    ans = min(ans, (H - 1) // A + 1 + i + 1)
print(ans)

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

-B.sort(reverse=True) -ans = (H - 1) // A + 1 -for i in range(N): +B = sorted(B, reverse=True) + [0] +i = 0 +while B[i] >= A: +    i += 1 +B = B[:i] +ans = 0 +for i in range(len(B)): +    ans += 1 -        ans = min(ans, i + 1) -        break -    ans = min(ans, (H - 1) // A + 1 + i + 1) -print(ans) +        print(ans) +        exit() +print((ans + (H - 1) // A + 1))