# coding: utf-8
from math import ceil
N, H = map(int, input().split())
li = []
atop = 0
for _ in range(N):
    a, b = map(int, input().split())
    atop = max(atop, a)
    li.append([a, b])
li.sort(key=lambda x: x[1], reverse=True)
# print(li)
ans = ceil(H/atop)
cnt = 0
for i in range(N):
    H -= li[i][1]
    cnt += 1
    ans = min(ans, cnt + max(0, ceil(H/atop)))
print(ans)
print(ceil(-10 / 2))