from heapq import heappush, heappop

from operator import itemgetter

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

a = []

aa = []

for i in range(N):

    ta,tb = list(map(int, input().split()))

    a.append([i,ta,tb])

    aa.append(tb)

a = sorted(a, key=itemgetter(2), reverse=True)

aa.append(0)

aa.sort()

b = max(a, key=itemgetter(1))[1]

n = K//b+1

res = 0



while K>0:

    t = aa.pop()

    if t > b:

        K -= t

        res+=1

    else:

        res +=-(-K//b)

        K = 0

        break

print(res)
from heapq import heappush, heappop

from operator import itemgetter

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

a = []

aa = []

for i in range(N):

    ta,tb = list(map(int, input().split()))

    a.append(ta)

    aa.append(tb)

a = sorted(a)

aa.append(0)

aa.sort()

b = max(a)

n = K//b+1

res = 0



while K>0:

    t = aa.pop()

    if t > b:

        K -= t

        res+=1

    else:

        res +=-(-K//b)

        K = 0

        break

print(res)
from heapq import heappush, heappop
from operator import itemgetter

N, K = list(map(int, input().split()))
a = []
aa = []
for i in range(N):
    ta, tb = list(map(int, input().split()))
    a.append([i, ta, tb])
    aa.append(tb)
a = sorted(a, key=itemgetter(2), reverse=True)
aa.append(0)
aa.sort()
b = max(a, key=itemgetter(1))[1]
n = K // b + 1
res = 0
while K > 0:
    t = aa.pop()
    if t > b:
        K -= t
        res += 1
    else:
        res += -(-K // b)
        K = 0
        break
print(res)

from heapq import heappush, heappop
from operator import itemgetter

N, K = list(map(int, input().split()))
a = []
aa = []
for i in range(N):
    ta, tb = list(map(int, input().split()))
    a.append(ta)
    aa.append(tb)
a = sorted(a)
aa.append(0)
aa.sort()
b = max(a)
n = K // b + 1
res = 0
while K > 0:
    t = aa.pop()
    if t > b:
        K -= t
        res += 1
    else:
        res += -(-K // b)
        K = 0
        break
print(res)

-    a.append([i, ta, tb]) +    a.append(ta) -a = sorted(a, key=itemgetter(2), reverse=True) +a = sorted(a) -b = max(a, key=itemgetter(1))[1] +b = max(a)