N,M = map(int,input().split())

X = [list(map(int,input().split())) for _ in range(N)]
X = sorted(X,key=lambda X:-X[0])
a = X[0][0]
X = sorted(X,key=lambda X:-X[1])

count = 0
for i in range(N):
	if a <= X[i][1]:
		M -= X[i][1]
		count += 1
		if M + X[i][1] < 0:
			break

if M > 0:
	count += -((-M)//a)

print(count)