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

ab = []

for _ in range(n):

    a, b = (int(x) for x in input().split())

    ab.append([a, b])

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

x,y = ab.pop(0)

ab.append([x,y])

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

count = 0

for i ,j in ab:

    if x <= j:

        h -= j

        count += 1

        if h <= 0:

            print(count)

            exit()

    else:

        break



if h%x==0:

    print((count+h//x))

else:

    print((count+1+h//x))
N,H = list(map(int,input().split()))

B = []

max_attack = 0

for i in range(N):

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

    max_attack = max(a,max_attack)

    B.append(b)



B.sort(reverse=True)

ans = 0



for b in B:

    if max_attack <= b:

        H -= b

        ans += 1

        if H <= 0:

            break

    else:

        break



if 0 < H:

    if H%max_attack == 0:

        ans += H//max_attack

    else:

        ans += 1+H//max_attack

print(ans)

n, h = list(map(int, input().split()))
ab = []
for _ in range(n):
    a, b = (int(x) for x in input().split())
    ab.append([a, b])
ab = sorted(ab, key=lambda x: -x[0])
x, y = ab.pop(0)
ab.append([x, y])
ab = sorted(ab, key=lambda x: -x[1])
count = 0
for i, j in ab:
    if x <= j:
        h -= j
        count += 1
        if h <= 0:
            print(count)
            exit()
    else:
        break
if h % x == 0:
    print((count + h // x))
else:
    print((count + 1 + h // x))

N, H = list(map(int, input().split()))
B = []
max_attack = 0
for i in range(N):
    a, b = list(map(int, input().split()))
    max_attack = max(a, max_attack)
    B.append(b)
B.sort(reverse=True)
ans = 0
for b in B:
    if max_attack <= b:
        H -= b
        ans += 1
        if H <= 0:
            break
    else:
        break
if 0 < H:
    if H % max_attack == 0:
        ans += H // max_attack
    else:
        ans += 1 + H // max_attack
print(ans)

-n, h = list(map(int, input().split())) -ab = [] -for _ in range(n): -    a, b = (int(x) for x in input().split()) -    ab.append([a, b]) -ab = sorted(ab, key=lambda x: -x[0]) -x, y = ab.pop(0) -ab.append([x, y]) -ab = sorted(ab, key=lambda x: -x[1]) -count = 0 -for i, j in ab: -    if x <= j: -        h -= j -        count += 1 -        if h <= 0: -            print(count) -            exit() +N, H = list(map(int, input().split())) +B = [] +max_attack = 0 +for i in range(N): +    a, b = list(map(int, input().split())) +    max_attack = max(a, max_attack) +    B.append(b) +B.sort(reverse=True) +ans = 0 +for b in B: +    if max_attack <= b: +        H -= b +        ans += 1 +        if H <= 0: +            break -if h % x == 0: -    print((count + h // x)) -else: -    print((count + 1 + h // x)) +if 0 < H: +    if H % max_attack == 0: +        ans += H // max_attack +    else: +        ans += 1 + H // max_attack +print(ans)