from functools import reduce
N,M = map(int, input(">>>").split())
data = list(map(int, input(">>>").split()))
I, MUL = 0, 0
for i in range(N):
if i <= N - M :
s1 = reduce(lambda x, y: x *y, data[i:i+M], 1)
if s1 > MUL:
I = i + 1
MUL = s1
print(MUL, I)