import math

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

data=[]

for i in range(N):

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

    data.append([a,b,i])



s1 = sorted(data,key = lambda x:(-x[1],x[0]))

s2 = sorted(data,key = lambda x:(-x[0],x[1]))

cnt = 0

maxNum = s2[0][2]



for i in range(N):

    if H > 0:

        if s1[i][1] > s2[0][0]:

            if s1[i][2] == maxNum:

                continue

            else:

                H -= s1[i][1]

                cnt += 1

        else:

            H -= s2[0][1]

            cnt += 1

            break

        

    else:

        print(cnt)

        exit()

else:

    H -= s2[0][1]

    cnt += 1

    





if H > 0:

    print((cnt + math.ceil(H/s2[0][0])))

else:

    print(cnt)
import math

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

data=[]

for i in range(N):

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

    data.append([a,b])



s1 = sorted(data,key = lambda x:-x[1])

s2 = sorted(data,key = lambda x:-x[0])

cnt = 0





for i in range(N):

    if H > 0:

        if s1[i][1] > s2[0][0]:

            H -= s1[i][1]

            cnt += 1

        else:

            break

    else:

        print(cnt)

        exit()

    





if H > 0:

    print((cnt + math.ceil(H/s2[0][0])))

else:

    print(cnt)

        

        
import math

N, H = list(map(int, input().split()))
data = []
for i in range(N):
    a, b = list(map(int, input().split()))
    data.append([a, b, i])
s1 = sorted(data, key=lambda x: (-x[1], x[0]))
s2 = sorted(data, key=lambda x: (-x[0], x[1]))
cnt = 0
maxNum = s2[0][2]
for i in range(N):
    if H > 0:
        if s1[i][1] > s2[0][0]:
            if s1[i][2] == maxNum:
                continue
            else:
                H -= s1[i][1]
                cnt += 1
        else:
            H -= s2[0][1]
            cnt += 1
            break
    else:
        print(cnt)
        exit()
else:
    H -= s2[0][1]
    cnt += 1
if H > 0:
    print((cnt + math.ceil(H / s2[0][0])))
else:
    print(cnt)

import math

N, H = list(map(int, input().split()))
data = []
for i in range(N):
    a, b = list(map(int, input().split()))
    data.append([a, b])
s1 = sorted(data, key=lambda x: -x[1])
s2 = sorted(data, key=lambda x: -x[0])
cnt = 0
for i in range(N):
    if H > 0:
        if s1[i][1] > s2[0][0]:
            H -= s1[i][1]
            cnt += 1
        else:
            break
    else:
        print(cnt)
        exit()
if H > 0:
    print((cnt + math.ceil(H / s2[0][0])))
else:
    print(cnt)

-    data.append([a, b, i]) -s1 = sorted(data, key=lambda x: (-x[1], x[0])) -s2 = sorted(data, key=lambda x: (-x[0], x[1])) +    data.append([a, b]) +s1 = sorted(data, key=lambda x: -x[1]) +s2 = sorted(data, key=lambda x: -x[0]) -maxNum = s2[0][2] -            if s1[i][2] == maxNum: -                continue -            else: -                H -= s1[i][1] -                cnt += 1 +            H -= s1[i][1] +            cnt += 1 -            H -= s2[0][1] -            cnt += 1 -else: -    H -= s2[0][1] -    cnt += 1