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

ab=[list(map(int,input().split())) for i in range(n)]

a_max=0

b=[]

ans=0

kaisuu=0

for i in range(n):

  if a_max<ab[i][0]:

    a_max=ab[i][0]

for i in range(n):

  b.append(ab[i][1])

b.sort(reverse=True)

i=0

while True:

  if len(b)>i and a_max<b[i]:

    h-=b[i]

    kaisuu+=1

  else:

    if h%a_max==0:

      kaisuu+=(h//a_max)

    else:

      kaisuu+=((h//a_max)+1)

    break

  if h<=0:

    break

  i+=1

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

A=[]

B=[]

for i in range(n):

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

  A.append(a)

  B.append(b)

A=max(A)

B.sort(reverse=True)

count=0

for i in B:

  if A>i:

    break

  else:

    if h>0:

      h-=i

      count+=1

    else:

      break

if h%A==0 and h>0:

  print((count+h//A))

elif h%A!=0 and h>0:

  print((count+h//A+1))

else:

  print(count)
n, h = list(map(int, input().split()))
ab = [list(map(int, input().split())) for i in range(n)]
a_max = 0
b = []
ans = 0
kaisuu = 0
for i in range(n):
    if a_max < ab[i][0]:
        a_max = ab[i][0]
for i in range(n):
    b.append(ab[i][1])
b.sort(reverse=True)
i = 0
while True:
    if len(b) > i and a_max < b[i]:
        h -= b[i]
        kaisuu += 1
    else:
        if h % a_max == 0:
            kaisuu += h // a_max
        else:
            kaisuu += (h // a_max) + 1
        break
    if h <= 0:
        break
    i += 1
print(kaisuu)

n, h = list(map(int, input().split()))
A = []
B = []
for i in range(n):
    a, b = list(map(int, input().split()))
    A.append(a)
    B.append(b)
A = max(A)
B.sort(reverse=True)
count = 0
for i in B:
    if A > i:
        break
    else:
        if h > 0:
            h -= i
            count += 1
        else:
            break
if h % A == 0 and h > 0:
    print((count + h // A))
elif h % A != 0 and h > 0:
    print((count + h // A + 1))
else:
    print(count)

-ab = [list(map(int, input().split())) for i in range(n)] -a_max = 0 -b = [] -ans = 0 -kaisuu = 0 +A = [] +B = [] -    if a_max < ab[i][0]: -        a_max = ab[i][0] -for i in range(n): -    b.append(ab[i][1]) -b.sort(reverse=True) -i = 0 -while True: -    if len(b) > i and a_max < b[i]: -        h -= b[i] -        kaisuu += 1 +    a, b = list(map(int, input().split())) +    A.append(a) +    B.append(b) +A = max(A) +B.sort(reverse=True) +count = 0 +for i in B: +    if A > i: +        break -        if h % a_max == 0: -            kaisuu += h // a_max +        if h > 0: +            h -= i +            count += 1 -            kaisuu += (h // a_max) + 1 -        break -    if h <= 0: -        break -    i += 1 -print(kaisuu) +            break +if h % A == 0 and h > 0: +    print((count + h // A)) +elif h % A != 0 and h > 0: +    print((count + h // A + 1)) +else: +    print(count)