import numpy as np
N, H = map(int,input().split())

maxA = 0
B = []
for _ in range(N):
    a, b = map(int,input().split())
    B.append(b)
    if maxA < a:
        maxA = a

B = np.array(B)
throw_all = np.sort((B[B>maxA]))[::-1]
SUM = 0
cnt = 0
for a in throw_all:
    SUM += a
    cnt += 1
    if SUM >= H:
        print(cnt)
        exit()

ans = -(-(H-SUM)//maxA)+ cnt
print(ans)

2766b55026e803480d1b7f3aded91a1720544ea1
<mask token>

<mask token>
for _ in range(N):
    a, b = map(int, input().split())
    B.append(b)
    if maxA < a:
        maxA = a
<mask token>
for a in throw_all:
    SUM += a
    cnt += 1
    if SUM >= H:
        print(cnt)
        exit()
<mask token>
print(ans)

<mask token>
N, H = map(int, input().split())
maxA = 0
B = []
for _ in range(N):
    a, b = map(int, input().split())
    B.append(b)
    if maxA < a:
        maxA = a
B = np.array(B)
throw_all = np.sort(B[B > maxA])[::-1]
SUM = 0
cnt = 0
for a in throw_all:
    SUM += a
    cnt += 1
    if SUM >= H:
        print(cnt)
        exit()
ans = -(-(H - SUM) // maxA) + cnt
print(ans)

import numpy as np
N, H = map(int, input().split())
maxA = 0
B = []
for _ in range(N):
    a, b = map(int, input().split())
    B.append(b)
    if maxA < a:
        maxA = a
B = np.array(B)
throw_all = np.sort(B[B > maxA])[::-1]
SUM = 0
cnt = 0
for a in throw_all:
    SUM += a
    cnt += 1
    if SUM >= H:
        print(cnt)
        exit()
ans = -(-(H - SUM) // maxA) + cnt
print(ans)

import numpy as np
N, H = map(int,input().split())

maxA = 0
B = []
for _ in range(N):
    a, b = map(int,input().split())
    B.append(b)
    if maxA < a:
        maxA = a

B = np.array(B)
throw_all = np.sort((B[B>maxA]))[::-1]
SUM = 0
cnt = 0
for a in throw_all:
    SUM += a
    cnt += 1
    if SUM >= H:
        print(cnt)
        exit()

ans = -(-(H-SUM)//maxA)+ cnt
print(ans)
