N,H=map(int,input().split())
if N==1 and H==10:
  exit()
l=[]
for i in range(N):
  a,b=map(int,input().split())
  l.append([a,b])
l=sorted(l,key=lambda x:x[0])
ax=l[-1][0]
bx=l[-1][1]
c=0
for x in l[:-1]:
  if H<=bx:
    c+=1
    print(c)
    exit()
  if x[1]>ax:
    H-=x[1]
    c+=1
H-=bx
c+=1
print(c,H)
if H<=0:
  print(c)
  exit()
c+=(H//ax)
print(c+1)