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

slash=[]

throw=[]

for i in range(n):

    x,y=list(map(int,input().split()))

    slash.append(x)

    throw.append(y)

 

slash.sort(reverse=True)

throw.sort(reverse=True)

attack=0

for i in range(n):

    if throw[i]>=slash[0]:

        h-=throw[i]

        attack+=1

        if h<=0:

            print(attack)

            exit()

    else :

        break

 

attack+=int((h+slash[0]-1)/(slash[0]))

print(attack)
N,HP=list(map(int,input().split()))

K=0

listN=[]

 

for i in range(N):

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

    if k>K:

        K=k

    listN.append(n)

listN.sort(reverse=True)

cnt=0

for i in range(N):

    if listN[i]>=K:

        HP-=listN[i]

        cnt+=1

        if HP<=0:

            print(cnt)

            exit()

    else:

        break

 

cnt+=int((HP+K-1)/K)

print(cnt)
n, h = list(map(int, input().split()))
slash = []
throw = []
for i in range(n):
    x, y = list(map(int, input().split()))
    slash.append(x)
    throw.append(y)
slash.sort(reverse=True)
throw.sort(reverse=True)
attack = 0
for i in range(n):
    if throw[i] >= slash[0]:
        h -= throw[i]
        attack += 1
        if h <= 0:
            print(attack)
            exit()
    else:
        break
attack += int((h + slash[0] - 1) / (slash[0]))
print(attack)

N, HP = list(map(int, input().split()))
K = 0
listN = []
for i in range(N):
    k, n = list(map(int, input().split()))
    if k > K:
        K = k
    listN.append(n)
listN.sort(reverse=True)
cnt = 0
for i in range(N):
    if listN[i] >= K:
        HP -= listN[i]
        cnt += 1
        if HP <= 0:
            print(cnt)
            exit()
    else:
        break
cnt += int((HP + K - 1) / K)
print(cnt)

-n, h = list(map(int, input().split())) -slash = [] -throw = [] -for i in range(n): -    x, y = list(map(int, input().split())) -    slash.append(x) -    throw.append(y) -slash.sort(reverse=True) -throw.sort(reverse=True) -attack = 0 -for i in range(n): -    if throw[i] >= slash[0]: -        h -= throw[i] -        attack += 1 -        if h <= 0: -            print(attack) +N, HP = list(map(int, input().split())) +K = 0 +listN = [] +for i in range(N): +    k, n = list(map(int, input().split())) +    if k > K: +        K = k +    listN.append(n) +listN.sort(reverse=True) +cnt = 0 +for i in range(N): +    if listN[i] >= K: +        HP -= listN[i] +        cnt += 1 +        if HP <= 0: +            print(cnt) -attack += int((h + slash[0] - 1) / (slash[0])) -print(attack) +cnt += int((HP + K - 1) / K) +print(cnt)