import bisect

N,H = map(int, input().split())
AB = []
A  = []
B  = []
for i in range(N):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)
    AB.append((a,b))

A_max = max(A)
B = sorted(B)

B_ind = bisect.bisect_left(B,A_max,0,N)
print(B_ind,B[B_ind:])
sumB  = sum(B[B_ind:])

if sumB >= H:
    cnt = 0
    while H > 0:
        cnt += 1
        b = B[N - cnt]
        H -= b

    ans = cnt
else:
    H -= sumB
    ans = N - B_ind

    ans += H//A_max + min(1,H%A_max)

print(ans)
