import math

n,h = [int(i) for i in input().split()]
A=[]
for i in range(n):
    a,b = input().split()
    A.append([int(a),int(b)])
    
A.sort()

max_a,max_b = A.pop()
A.sort(key=lambda x:x[1],reverse=True)
ans = 0

for i in range(n-1):
    print(A[i][1])
    if A[i][1] >= max_a:
        ans += 1
        h -= A[i][1]
        if h <= 0:
            print(ans)
            break

    
if max_b > max_a:
    h -= max_b
    ans += 1
    if h <= 0:
        print(ans)
    else:
        print(ans+math.ceil(h//max_a))
        
else:
    print(ans+math.ceil(h//max_a))
    