n, k = map(int, input().split()) A = list(map(int, input().split())) A.sort() i = 0 while k > A[i]: k -= A[i] i += 1 if i == 0: print(1, k) else: print(i, k)