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

A = [0]*n

B = [0]*n 

for i in range(n):

  A[i], B[i] = list(map(int, input().split()))

A.sort(reverse=True)

B.sort(reverse=True)



c = 0

for j in range(n):

  if B[j] >= A[0]:

    c += 1

    h -= B[j]

    if h <= 0:

      print(c)

      exit()

  else:

    break

if h%A[0] == 0:

  c += h//A[0]

else:

  c += h//A[0]+1

print(c)



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

#AB = []

A = []

B = []

for i in range(n):

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

    A.append(a)

    B.append(b)

    #AB.append((a, b))



x = max(A)

B.sort(reverse=True)

ans = 0

for i, b in enumerate(B):

    if b > x:

        h -= b

        ans += 1

    else:

        break

    if h <= 0:

        print(ans)

        exit()

ans += (h+x-1)//x

print(ans)

n, h = list(map(int, input().split()))
A = [0] * n
B = [0] * n
for i in range(n):
    A[i], B[i] = list(map(int, input().split()))
A.sort(reverse=True)
B.sort(reverse=True)
c = 0
for j in range(n):
    if B[j] >= A[0]:
        c += 1
        h -= B[j]
        if h <= 0:
            print(c)
            exit()
    else:
        break
if h % A[0] == 0:
    c += h // A[0]
else:
    c += h // A[0] + 1
print(c)

n, h = list(map(int, input().split()))
# AB = []
A = []
B = []
for i in range(n):
    a, b = list(map(int, input().split()))
    A.append(a)
    B.append(b)
    # AB.append((a, b))
x = max(A)
B.sort(reverse=True)
ans = 0
for i, b in enumerate(B):
    if b > x:
        h -= b
        ans += 1
    else:
        break
    if h <= 0:
        print(ans)
        exit()
ans += (h + x - 1) // x
print(ans)

-A = [0] * n -B = [0] * n +# AB = [] +A = [] +B = [] -    A[i], B[i] = list(map(int, input().split())) -A.sort(reverse=True) +    a, b = list(map(int, input().split())) +    A.append(a) +    B.append(b) +    # AB.append((a, b)) +x = max(A) -c = 0 -for j in range(n): -    if B[j] >= A[0]: -        c += 1 -        h -= B[j] -        if h <= 0: -            print(c) -            exit() +ans = 0 +for i, b in enumerate(B): +    if b > x: +        h -= b +        ans += 1 -if h % A[0] == 0: -    c += h // A[0] -else: -    c += h // A[0] + 1 -print(c) +    if h <= 0: +        print(ans) +        exit() +ans += (h + x - 1) // x +print(ans)