The heat during the last few days has been really intense. Scientists from all over the Berland study how the temperatures and weather change, and they claim that this summer is abnormally hot. But any scientific claim sounds a lot more reasonable if there are some numbers involved, so they have decided to actually calculate some value which would represent how high the temperatures are.

Mathematicians of Berland State University came up with a special heat intensity value. This value is calculated as follows:

Suppose we want to analyze the segment of $n$ consecutive days. We have measured the temperatures during these $n$ days; the temperature during $i$-th day equals $a_i$.

We denote the average temperature of a segment of some consecutive days as the arithmetic mean of the temperature measures during this segment of days. So, if we want to analyze the average temperature from day $x$ to day $y$, we calculate it as $\frac{\sum \limits_{i = x}^{y} a_i}{y - x + 1}$ (note that division is performed without any rounding). The heat intensity value is the maximum of average temperatures over all segments of not less than $k$ consecutive days. For example, if analyzing the measures $[3, 4, 1, 2]$ and $k = 3$, we are interested in segments $[3, 4, 1]$, $[4, 1, 2]$ and $[3, 4, 1, 2]$ (we want to find the maximum value of average temperature over these segments).

You have been hired by Berland State University to write a program that would compute the heat intensity value of a given period of days. Are you up to this task?


-----Input-----

The first line contains two integers $n$ and $k$ ($1 \le k \le n \le 5000$) — the number of days in the given period, and the minimum number of days in a segment we consider when calculating heat intensity value, respectively.

The second line contains $n$ integers $a_1$, $a_2$, ..., $a_n$ ($1 \le a_i \le 5000$) — the temperature measures during given $n$ days.


-----Output-----

Print one real number — the heat intensity value, i. e., the maximum of average temperatures over all segments of not less than $k$ consecutive days.

Your answer will be considered correct if the following condition holds: $|res - res_0| < 10^{-6}$, where $res$ is your answer, and $res_0$ is the answer given by the jury's solution.


-----Example-----
Input
4 3
3 4 1 2

Output
2.666666666666667

Difficulty: introductory

Starter code:

Solutions:
n,k=list(map(int,input().split()))
a=list(map(int,input().split()))
prefix=[a[0]]
for i in range(1,n):
    prefix.append(prefix[-1]+a[i])
ans=[]
for i in range(n):
    for j in range(i+k-1,n):
        if(i==0):
            ans.append(prefix[j]/(j-i+1))
        else:
            ans.append((prefix[j]-prefix[i-1])/(j-i+1))
print(max(ans))

n, k = map(int, input().split())
a = list(map(int, input().split()))

ans = 0
for i in range(n):
    s = 0
    for j in range(i, n):
        s += a[j];
        if j - i + 1 >= k:
            ans = max(ans, s / (j - i + 1))
print(ans)

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
ans = 0.0
for i in range(n):
    s = 0
    for j in range(i, n):
        s += a[j]
        if j - i + 1 >= k:
            ans = max(ans, s / (j - i + 1))
print("%.20f" % ans)


from itertools import accumulate

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))

acc = [0] + list(accumulate(a))

ans = 0
for i in range(n - k + 1):
    for j in range(i + k, n + 1):
        s = acc[j] - acc[i]
        t = s / (j - i)

        ans = max(t, ans)

print(ans)


#import math
#import itertools
#from collections import defaultdict, Counter, deque

def max_average(nums, k):
    def get_delta(avg, nums, k):
        n = len(nums)
        accu = [0.0] * (n + 1)
        minval_pos = None
        delta = 0.0
        for i in range(n):
            accu[i+1] = nums[i] + accu[i] - avg
            if i >= (k-1):
                if minval_pos == None or accu[i-k+1] < accu[minval_pos]:
                    minval_pos = i-k+1
                if accu[i+1] - accu[minval_pos] >= 0:
                    delta = max(delta, (accu[i+1] - accu[minval_pos]) / (i+1 - minval_pos))
        return delta

    left, delta = min(nums), float("inf")
    while delta > 1e-6:
        delta = get_delta(left, nums, k)
        left += delta
    return left

def f(arr, k):
    return max_average(arr, k)
    

n, k = [int(i) for i in input().split()]
arr = [int(i) for i in input().split()]
print(f(arr, k))

from itertools import accumulate

n, k = map(int, input().split())
a = map(int, input().split())
sums = [0] + list(accumulate(a))

res = 0

for l in range(k, n + 1):
    for i in range(0, n - l + 1):
        res = max(res, (sums[i + l] - sums[i]) / l)
        
print(res)

n, k = map(int,input().split())
s = [int(i) for i in input().split()]
p  = [0] * (n+1)
for i in range(1, n+1):
    p[i] = p[i-1] + s[i-1]
ma = -5000
for i in range(k, n+1):
    for j in range(k, n+1):
        sred = (p[j] - p[j-i])/i
        if sred > ma:
            ma = sred
print(ma)

# from decimal import *
n, k = list(map(int, input().split()))
temps = [int(i) for i in input().split()]
predpr = [0]
for i in range(n):
    predpr.append(predpr[i] + temps[i])
ma = 0
# print(predpr)
for i in range(1, n - k + 2):
    for j in range(i + k - 1, n + 1):
        cur = (predpr[j] - predpr[i - 1]) / (j - i + 1)
        if cur > ma:
            ma = cur
            # print(i, j)
print(ma)


n,k=list(map(int,input().split()))
s=list(map(int,input().split()))
x=sum(s[0:k])
ans=-1000000000000000
for i in range(n-k+1):
    av=sum(s[i:k+i])/k
    if av>ans:
        ans=av
    for j in range(n-k-i):
        av=(((av)*(k+j))+s[k+i+j])/(k+j+1)
        if av>ans:
            ans=av
print(ans)


n,k=list(map(int,input().split()))
a=[int(i) for i in input().split()]
sum=0
ma=0.0
for i in range(k,n+1):
    start=0
    last=i
    sum=0
    for i in range(0,last):
        sum=sum+a[i]
    #print(sum,i+1)
    ma=max(sum/(i+1),ma)
    #print(ma)
    while(last<n):
        last=last+1
        sum=sum-a[start]+a[last-1]
        start=start+1
        #print(sum,i+1)
        ma=max((sum/(i+1)),ma)
        #print(ma)
print(ma)


n,k=map(int,input().split())
arr=list(map(int,input().split()))
find=[0]*n
for i in range(n):
	find[i]=[0]*n
presum=[0]*n
presum[0]=arr[0]
for i in range(1,n):
	presum[i]=presum[i-1]+arr[i]
for i in range(n-k+1):
	for j in range(i+k-1,n):
		if i==0:
			find[i][j]=presum[j]/(j+1)
		else:
			find[i][j]=(presum[j]-presum[i-1])/(j-i+1)
maxi=0
for i in range(n):
	for j in range(n):
		if find[i][j]>maxi:
			maxi=find[i][j]
print(maxi)

import collections
from statistics import mean
max=0
s=input().split()
n,k=int(s[0]),int(s[1])
a=input().split()
a=[int(i) for i in a]
for i in range(0,n-k+1):
    #print(a[i:i+k])
    s=sum(a[i:i+k])
    m=s/k
    #print(s)
    if(m>max):
        max=m
    num=k
    for j in range(i+k,n):
        s+=a[j]
        num+=1
        m=s/num
        #print(m)
        if m>max:
            max=m
print(max)

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
b = [0]
for i in range(n):
    b.append(a[i] + b[i])
max1 = 0
for i in range(k, n + 1):
    for j in range(1, n - i + 2):
        max1 = max(max1, (b[j + i - 1] - b[j - 1]) / i)
print(max1)


n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
s = 0

ps = [0]
for i in a:
    ps.append(ps[-1] + i)

for j in range(k, n + 1):
    for i in range(n):
        if n < i + j:
            break
        s = max(s, (ps[i + j] - ps[i]) / j)

print(s)


n, k = map(int, input().split())
p = [0]
maxx = 0
s = input().split()
for i in range(n):
    p.append(p[i] + int(s[i]))
for i in range(k, n + 1):
    for j in range(1, n - i + 2):
        if maxx < (p[j + i - 1] - p[j - 1]) / i:
            maxx = (p[j + i - 1] - p[j - 1]) / i
print(maxx)

read=lambda:list(map(int,input().split()))
n,k=read()
a=list(read())
s=[0]*(n+1)
for i in range(1,n+1):
    s[i]=s[i-1]+a[i-1]
ans=0
for i in range(1,n+1):
    for j in range(i+k-1,n+1):
        t=(s[j]-s[i-1])/(j-i+1)
        ans=max(ans,t)
print(ans)



def solve(n, k, l):
    dp = [[0] * n for _ in range(n +1)]
    for i in range(1, n + 1):
        for j in range(n):
            if i + j - 1 < len(l):
                dp[i][j] = dp[i - 1][j] + l[i + j -1]
    m = 0
    for i in range(k, n + 1):
        for j in range(n):
            m = max(m, dp[i][j] / i)
    return m

def __starting_point():
    n, k = list(map(int, input().split()))
    l = list(map(int, input().split()))
    print(solve(n, k , l))

__starting_point()

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))

rt = -1

ap = [a[0]]

for i in range(1, n):
	ap.append(ap[i-1] + a[i])

for ki in range(k, n+1):
	ans = -1
	for i in range(n-ki+1):

		if i+ki-1 < n:
			if i>0:
				ans = max(ans, (ap[i+ki-1] - ap[i-1]) )
			else:
				ans = max(ans, ap[i+ki-1])

	rt = max(rt, ans/ki)

print(rt)

def solve(n, k, l):
    dp = [[0] * n for _ in range(n +1)]
    m = 0
    for i in range(1, n + 1):
        for j in range(n):
            if i + j - 1 >= len(l):
                continue
            dp[i][j] = dp[i - 1][j] + l[i + j -1]
            if i >= k:
                m = max(m, dp[i][j] / i)
    return m

def __starting_point():
    n, k = list(map(int, input().split()))
    l = list(map(int, input().split()))
    print(solve(n, k , l))

__starting_point()

n, k = map(int, input().split(' '))
a = input().split(' ')
for i in range(n):
    a[i] = int(a[i])
s = 0.0
for i in range(n-k+1):
    prom = sum(a[i:i+k])
    num = k
    if prom / num > s:
        s = prom /num
    for j in range(i+k, min(n, i+2*k)):
        prom += a[j]
        num += 1
        if prom / num > s:
            s = prom/num
print(s)

arr = list(map(int, input().split()))
n = arr[0]
k = arr[1]
arr = list(map(int, input().split()))
arr2 = []
# maxi = [0 for i in range(k)]
for i in range(k, n+1):
	temp = sum(arr[0:i])
	temp3 = temp
	for j in range(i, n):
		temp2 = temp3 + arr[j] - arr[j-i]
		temp3 = temp2
		if(temp2>temp):
			temp = temp2
	arr2.append(temp/i)

print(max(arr2))

n, k = list(map(int, input().split(' ')))
a = input().split(' ')
for i in range(n):
    a[i] = int(a[i])
s = 0.0
for i in range(n-k+1):
    prom = sum(a[i:i+k])
    num = k
    if prom / num > s:
        s = prom /num
    for j in range(i+k, min(n, i+2*k)):
        prom += a[j]
        num += 1
        if prom / num > s:
            s = prom/num
print(s)


def main():
    n, k = list(map(int, input().split()))
    a = [0] + list(map(int, input().split()))
    if k == 1:
        print(max(a))
        return 0
    for i in range(n):
        a[i + 1] += a[i]
    maks = [0] * (n - k + 1)
    for j in range(n - k + 1):
        for i in range(n - j - k + 1):
            maks[j] = max(maks[j], a[i + j + k] - a[i])
    mask = 0
    for i in range(n - k + 1):
        mask = max(mask, maks[i] / (k +i))
    print(mask)
    return 0
main()


n,k = list(map(int,input().split()))
a = list(map(int,input().split()))
m = 0
for i in range(0,n-k+1):
    x = sum(a[i:k+i-1])
    y = len(a[i:k+i-1])
    for j in range(k+i,n+1):
        x +=a[j-1]
        y +=1
        if x/y > m:
            m = x/y
print(m)


n,k = list(map(int,input().split()))
a = list(map(int,input().split()))
m = 0
for i in range(0,n-k+1):
    x = sum(a[i:k+i-1])
    y = k-1
    for j in range(k+i,n+1):
        x +=a[j-1]
        y +=1
        if x/y > m:
            m = x/y
print(m)