Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

HS09BWB - Building with Blocks

Little John enjoys playing with blocks. He builds constructions along an imaginary straight line in such a way that we can describe his work by means of an integer N, the length of the line, and a list of N non-negative integers, the height of the building at each horizontal position.

Today he would like to build a skyscraper. But, before that, he needs to make sure there are K consecutive positions of the same height, in order to use that section as a base for the skyscraper.

You are to write a program that finds a section such that the number of block addition/removal operations needed to achieve such a flat base is minimized.

You may assume Little John has an infinite number of blocks at his disposal.

Input

Input starts with two space separated integers: the length of the line (1<=N<=1000000) and the length of the required base (1<=K<=N). N space-separated non-negative integers follow, representing the height of the current building at each horizontal position (0<=Hi<=1000000).

Output

Output two space-separated integers O and P on a single line. The first one must correspond to the number of operations needed to make the base in the section starting at position P (the leftmost position is 0 and the rightmost is N-1). P must be as small as possible.

Example

Input:
6 4
0 4 2 4 5 8

Output:
3 1

Added by:Yandry Perez
Date:2010-03-05
Time limit:1s-3.599s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: CLOJURE NODEJS OBJC PERL6 SQLITE VB.NET
Resource:High School Programming League 2009/10

hide comments
2010-04-24 11:47:08 kuszi
The last (additional) testcase has been added after the contest thanks to Marcin Skiba and Anna Piekarska (see: HSPL forum).

Last edit: 2010-04-24 11:47:23
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.