T=0



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)



A.sort(reverse=True)

B.sort(reverse=True)



for i in range(N):

    if A[0]<=B[i]:

        H-=B[i]

        T+=1

        if H<=0:

            break



if H>0:

    T+=int(H/A[0])

    if H%A[0]>0:

        T+=1



print(T)

import math



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)



ans=0



B.sort(reverse=True)

Am=max(A)

for i in range(N):

    if B[i]>=Am:

        H-=B[i]

        ans+=1

    if H<=0:

        break



if H>0:

    ans+=math.ceil(H/Am)



print(ans)

T = 0
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)
A.sort(reverse=True)
B.sort(reverse=True)
for i in range(N):
    if A[0] <= B[i]:
        H -= B[i]
        T += 1
        if H <= 0:
            break
if H > 0:
    T += int(H / A[0])
    if H % A[0] > 0:
        T += 1
print(T)

import math

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)
ans = 0
B.sort(reverse=True)
Am = max(A)
for i in range(N):
    if B[i] >= Am:
        H -= B[i]
        ans += 1
    if H <= 0:
        break
if H > 0:
    ans += math.ceil(H / Am)
print(ans)

-T = 0 +import math + -A.sort(reverse=True) +ans = 0 +Am = max(A) -    if A[0] <= B[i]: +    if B[i] >= Am: -        T += 1 -        if H <= 0: -            break +        ans += 1 +    if H <= 0: +        break -    T += int(H / A[0]) -    if H % A[0] > 0: -        T += 1 -print(T) +    ans += math.ceil(H / Am) +print(ans)