# ABC085 D - Katana Thrower

import numpy as np

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

A = []

B = []

ans = 0



for i in range(n):

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

    A.append(a)

    B.append(b)



B = np.array(B)

a = max(A)

B = B[B > a]

B = np.sort(B)[::-1]



for i in range(len(B)):

    if h <= 0:

        break

    h -= B[i]

    ans += 1



if h > 0:

    ans += (h-1)//a + 1

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

ab=[]

ans=0

for i in range(n):

  aa,bb=list(map(int,input().split()))

  ab.append([aa,bb])



ab.sort(key=lambda x: x[0],reverse=True)

katana=ab[0][0]

ab.sort(key=lambda x: x[1],reverse=True)

cnt=0

# print(ab)

for a,b in ab:

  if b>katana:

    cnt+=1



for i in range(cnt):

  if h<=0:break

  h-=ab[i][1]

  ans+=1

if h>0:

  ans+=(h-1)//katana+1

print(ans)



# ABC085 D - Katana Thrower
import numpy as np

n, h = list(map(int, input().split()))
A = []
B = []
ans = 0
for i in range(n):
    a, b = list(map(int, input().split()))
    A.append(a)
    B.append(b)
B = np.array(B)
a = max(A)
B = B[B > a]
B = np.sort(B)[::-1]
for i in range(len(B)):
    if h <= 0:
        break
    h -= B[i]
    ans += 1
if h > 0:
    ans += (h - 1) // a + 1
print(ans)

n, h = list(map(int, input().split()))
ab = []
ans = 0
for i in range(n):
    aa, bb = list(map(int, input().split()))
    ab.append([aa, bb])
ab.sort(key=lambda x: x[0], reverse=True)
katana = ab[0][0]
ab.sort(key=lambda x: x[1], reverse=True)
cnt = 0
# print(ab)
for a, b in ab:
    if b > katana:
        cnt += 1
for i in range(cnt):
    if h <= 0:
        break
    h -= ab[i][1]
    ans += 1
if h > 0:
    ans += (h - 1) // katana + 1
print(ans)

-# ABC085 D - Katana Thrower -import numpy as np - -A = [] -B = [] +ab = [] -    a, b = list(map(int, input().split())) -    A.append(a) -    B.append(b) -B = np.array(B) -a = max(A) -B = B[B > a] -B = np.sort(B)[::-1] -for i in range(len(B)): +    aa, bb = list(map(int, input().split())) +    ab.append([aa, bb]) +ab.sort(key=lambda x: x[0], reverse=True) +katana = ab[0][0] +ab.sort(key=lambda x: x[1], reverse=True) +cnt = 0 +# print(ab) +for a, b in ab: +    if b > katana: +        cnt += 1 +for i in range(cnt): -    h -= B[i] +    h -= ab[i][1] -    ans += (h - 1) // a + 1 +    ans += (h - 1) // katana + 1