# 振るのは最強のやつだけ

# 投げるのは強い順

 

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

AB = [[int(x) for x in input().split()] for _ in range(N)]

A,B = list(zip(*AB))

 

a = max(A) # 振る

B = [b for b in B if b > a] # 投げる価値あり

B.sort(reverse = True)



attack_cnt = 0

 

for b in B:

  if H <= 0:

    break

  attack_cnt += 1

  H -= b

  

if H > 0:

  attack_cnt += (H-1)//a + 1

  

print(attack_cnt)


def resolve():

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

    A = [0] * N

    B = [0] * N

    for i in range(N):

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

        A[i] = a

        B[i] = b

    a_max = max(A)



    # a_maxより高い攻撃力を選択(a_maxは何回でも行えるのでそれより低いものは選択しない)

    B = [b for b in B if a_max < b]

    B.sort(reverse=True)



    cnt = 0

    for b in B:

        if H <= 0:

            print(cnt)

            return

        H -= b

        cnt += 1



    cnt += -(-H // a_max)

    print(cnt)





if __name__ == "__main__":

    resolve()
# 振るのは最強のやつだけ
# 投げるのは強い順
N, H = list(map(int, input().split()))
AB = [[int(x) for x in input().split()] for _ in range(N)]
A, B = list(zip(*AB))
a = max(A)  # 振る
B = [b for b in B if b > a]  # 投げる価値あり
B.sort(reverse=True)
attack_cnt = 0
for b in B:
    if H <= 0:
        break
    attack_cnt += 1
    H -= b
if H > 0:
    attack_cnt += (H - 1) // a + 1
print(attack_cnt)

def resolve():
    N, H = list(map(int, input().split()))
    A = [0] * N
    B = [0] * N
    for i in range(N):
        a, b = list(map(int, input().split()))
        A[i] = a
        B[i] = b
    a_max = max(A)
    # a_maxより高い攻撃力を選択(a_maxは何回でも行えるのでそれより低いものは選択しない)
    B = [b for b in B if a_max < b]
    B.sort(reverse=True)
    cnt = 0
    for b in B:
        if H <= 0:
            print(cnt)
            return
        H -= b
        cnt += 1
    cnt += -(-H // a_max)
    print(cnt)


if __name__ == "__main__":
    resolve()

-# 振るのは最強のやつだけ -# 投げるのは強い順 -N, H = list(map(int, input().split())) -AB = [[int(x) for x in input().split()] for _ in range(N)] -A, B = list(zip(*AB)) -a = max(A)  # 振る -B = [b for b in B if b > a]  # 投げる価値あり -B.sort(reverse=True) -attack_cnt = 0 -for b in B: -    if H <= 0: -        break -    attack_cnt += 1 -    H -= b -if H > 0: -    attack_cnt += (H - 1) // a + 1 -print(attack_cnt) +def resolve(): +    N, H = list(map(int, input().split())) +    A = [0] * N +    B = [0] * N +    for i in range(N): +        a, b = list(map(int, input().split())) +        A[i] = a +        B[i] = b +    a_max = max(A) +    # a_maxより高い攻撃力を選択(a_maxは何回でも行えるのでそれより低いものは選択しない) +    B = [b for b in B if a_max < b] +    B.sort(reverse=True) +    cnt = 0 +    for b in B: +        if H <= 0: +            print(cnt) +            return +        H -= b +        cnt += 1 +    cnt += -(-H // a_max) +    print(cnt) + + +if __name__ == "__main__": +    resolve()