# Topic : Two-pointer _ 블로그
# 
# Python 3 : 시간 초과

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

visit = list(map(int,input().split()))
sum_visit = list()

loop = N - X + 1

for l in range(loop):
  sum_visit.append(sum(visit[l:l+X]))

max_visit = max(sum_visit)
if max_visit == 0:
  print('SAD')
else:
  print(max_visit)
  print(sum_visit.count(max_visit))
# Topic : Two-pointer _ 블로그
# 
# PyPy 3 : 118ms

N , X = map(int,input().split())
visit = list(map(int,input().split()))
val_list = list()

if max(visit) == 0:
  print('SAD')
else:
  value = sum(visit[:X])
  val_list.append(value)

  loop = N - X

  for l in range(loop):

    value -= visit[l]
    value += visit[X+l]

    val_list.append(value)

  print(max(val_list))
  print(val_list.count(max(val_list)))