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

ab=[]

a=[]

b=[]



for i in range(N):

    ab.append(list(map(int,input().split())))

    a.append(ab[i][0])

    b.append(ab[i][1])



a.sort(reverse=True)

b.sort(reverse=True)

k=0

cnt=0



while a[0]<b[k]:

    H-=b[k]

    cnt+=1

    if H<=0:

        break

    k+=1

    if k==len(b):

        break



#print(cnt,H)

H=max(H,0)



if H%a[0]==0:

    cnt+=H//a[0]

else:

    cnt+=H//a[0]+1



print(cnt)
# coding: utf-8

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



A=[]

B=[]

for i in range(N):

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

    A.append(a)

    B.append(b)



MA=max(A)

ans=0

B.sort()

k=-1



while B[k]>MA:

    H-=B[k]

    k-=1

    ans+=1

    if H<=0:

        break

    if k<-N:

        break

if H>=0:

    ans+=-(-H//MA)



print(ans)
N, H = list(map(int, input().split()))
ab = []
a = []
b = []
for i in range(N):
    ab.append(list(map(int, input().split())))
    a.append(ab[i][0])
    b.append(ab[i][1])
a.sort(reverse=True)
b.sort(reverse=True)
k = 0
cnt = 0
while a[0] < b[k]:
    H -= b[k]
    cnt += 1
    if H <= 0:
        break
    k += 1
    if k == len(b):
        break
# print(cnt,H)
H = max(H, 0)
if H % a[0] == 0:
    cnt += H // a[0]
else:
    cnt += H // a[0] + 1
print(cnt)

# coding: utf-8
N, H = list(map(int, input().split()))
A = []
B = []
for i in range(N):
    a, b = list(map(int, input().split()))
    A.append(a)
    B.append(b)
MA = max(A)
ans = 0
B.sort()
k = -1
while B[k] > MA:
    H -= B[k]
    k -= 1
    ans += 1
    if H <= 0:
        break
    if k < -N:
        break
if H >= 0:
    ans += -(-H // MA)
print(ans)

+# coding: utf-8 -ab = [] -a = [] -b = [] +A = [] +B = [] -    ab.append(list(map(int, input().split()))) -    a.append(ab[i][0]) -    b.append(ab[i][1]) -a.sort(reverse=True) -b.sort(reverse=True) -k = 0 -cnt = 0 -while a[0] < b[k]: -    H -= b[k] -    cnt += 1 +    a, b = list(map(int, input().split())) +    A.append(a) +    B.append(b) +MA = max(A) +ans = 0 +B.sort() +k = -1 +while B[k] > MA: +    H -= B[k] +    k -= 1 +    ans += 1 -    k += 1 -    if k == len(b): +    if k < -N: -# print(cnt,H) -H = max(H, 0) -if H % a[0] == 0: -    cnt += H // a[0] -else: -    cnt += H // a[0] + 1 -print(cnt) +if H >= 0: +    ans += -(-H // MA) +print(ans)