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

slash = 0

Throw = []

for _ in range(N):

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

    slash = max(slash, a)

    if b > a: Throw.append(b)    

#slash=斬撃最大ダメージ、投げてslash超のダメージが出るならばその刀をダメージが大きい順に投げる

Throw = sorted([th for th in Throw if th > slash], reverse=True)

dmg, cnt = 0, 0

for throw in Throw:

    if dmg >= H: break

    dmg += throw

    cnt += 1

if dmg < H:

    from math import ceil

    cnt += ceil((H-dmg)/slash)

print(cnt)


def main():

    with open(0) as f:

        N, H = list(map(int, f.readline().split()))

        ab = list(map(int, f.read().split()))

    max_slash = max(ab[0::2])

    throw = sorted([x for x in ab[1::2] if x > max_slash], reverse=True)

    cnt = 0

    for t in throw:

        if H <= 0:

            break

        H += -t

        cnt += 1

    if H > 0:

        cnt += (H+max_slash-1)//max_slash

    print(cnt)



main()



    
N, H = list(map(int, input().split()))
slash = 0
Throw = []
for _ in range(N):
    a, b = list(map(int, input().split()))
    slash = max(slash, a)
    if b > a:
        Throw.append(b)
# slash=斬撃最大ダメージ、投げてslash超のダメージが出るならばその刀をダメージが大きい順に投げる
Throw = sorted([th for th in Throw if th > slash], reverse=True)
dmg, cnt = 0, 0
for throw in Throw:
    if dmg >= H:
        break
    dmg += throw
    cnt += 1
if dmg < H:
    from math import ceil

    cnt += ceil((H - dmg) / slash)
print(cnt)

def main():
    with open(0) as f:
        N, H = list(map(int, f.readline().split()))
        ab = list(map(int, f.read().split()))
    max_slash = max(ab[0::2])
    throw = sorted([x for x in ab[1::2] if x > max_slash], reverse=True)
    cnt = 0
    for t in throw:
        if H <= 0:
            break
        H += -t
        cnt += 1
    if H > 0:
        cnt += (H + max_slash - 1) // max_slash
    print(cnt)


main()

-N, H = list(map(int, input().split())) -slash = 0 -Throw = [] -for _ in range(N): -    a, b = list(map(int, input().split())) -    slash = max(slash, a) -    if b > a: -        Throw.append(b) -# slash=斬撃最大ダメージ、投げてslash超のダメージが出るならばその刀をダメージが大きい順に投げる -Throw = sorted([th for th in Throw if th > slash], reverse=True) -dmg, cnt = 0, 0 -for throw in Throw: -    if dmg >= H: -        break -    dmg += throw -    cnt += 1 -if dmg < H: -    from math import ceil +def main(): +    with open(0) as f: +        N, H = list(map(int, f.readline().split())) +        ab = list(map(int, f.read().split())) +    max_slash = max(ab[0::2]) +    throw = sorted([x for x in ab[1::2] if x > max_slash], reverse=True) +    cnt = 0 +    for t in throw: +        if H <= 0: +            break +        H += -t +        cnt += 1 +    if H > 0: +        cnt += (H + max_slash - 1) // max_slash +    print(cnt) -    cnt += ceil((H - dmg) / slash) -print(cnt) + +main()