import numpy as np
n,h = map(int,input().split())
a,b=np.array([0]*n),np.array([0]*n)
for i in range(n):
    a[i],b[i] = map(int,input().split())

amax=max(a) 
#print(amax)
b2=b[b>amax]
#print(b2)
if h > sum(b2):
    print((h-sum(b2)+amax-1)//amax + len(b2))
else:
    b3=[h]
    for i in range(len(b2)):
        b3.append( sum(b2[i:]) )
    b3.sort()
    print(b3)
    print( np.where( np.array(b3)==h )[0][0] +1 )