import math

n,h = list(map(int,input().split()))

l = []; x,y = 0,0

for _ in range(n):

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

    if a > x or a == x and b < y:

        x,y = a,b

    if b < x:continue

    l.append((a,b))

l.remove((x,y))

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

ans = 0

for a,b in l:

    if b <= x:break

    if b < y and y >= h:

        print((ans+1));exit()

    h -= max(b,x)

    ans += 1

    if h <= 0:

        print(ans);exit()

d = math.ceil((max(0,h-y))/x)

print((ans + d + 1))

import math

n,h = list(map(int,input().split()))

A = 0; b = []; ans = 0

for _ in range(n):

    u,v = list(map(int,input().split()))

    A = max(A,u); b.append(v)



for B in sorted(b,key=lambda x:-x):

    if h <= 0 or B <= A:break

    h -= B

    ans += 1

print((max(0,math.ceil(h/A)) + ans))
import math

n, h = list(map(int, input().split()))
l = []
x, y = 0, 0
for _ in range(n):
    a, b = list(map(int, input().split()))
    if a > x or a == x and b < y:
        x, y = a, b
    if b < x:
        continue
    l.append((a, b))
l.remove((x, y))
l = sorted(l, key=lambda x: -x[1])
ans = 0
for a, b in l:
    if b <= x:
        break
    if b < y and y >= h:
        print((ans + 1))
        exit()
    h -= max(b, x)
    ans += 1
    if h <= 0:
        print(ans)
        exit()
d = math.ceil((max(0, h - y)) / x)
print((ans + d + 1))

import math

n, h = list(map(int, input().split()))
A = 0
b = []
ans = 0
for _ in range(n):
    u, v = list(map(int, input().split()))
    A = max(A, u)
    b.append(v)
for B in sorted(b, key=lambda x: -x):
    if h <= 0 or B <= A:
        break
    h -= B
    ans += 1
print((max(0, math.ceil(h / A)) + ans))

-l = [] -x, y = 0, 0 +A = 0 +b = [] +ans = 0 -    a, b = list(map(int, input().split())) -    if a > x or a == x and b < y: -        x, y = a, b -    if b < x: -        continue -    l.append((a, b)) -l.remove((x, y)) -l = sorted(l, key=lambda x: -x[1]) -ans = 0 -for a, b in l: -    if b <= x: +    u, v = list(map(int, input().split())) +    A = max(A, u) +    b.append(v) +for B in sorted(b, key=lambda x: -x): +    if h <= 0 or B <= A: -    if b < y and y >= h: -        print((ans + 1)) -        exit() -    h -= max(b, x) +    h -= B -    if h <= 0: -        print(ans) -        exit() -d = math.ceil((max(0, h - y)) / x) -print((ans + d + 1)) +print((max(0, math.ceil(h / A)) + ans))