#000276

Japanska buba

A Japanese bug flew into a cave full of obstacles: stalagmites (they are on the cave floor) and stalactites (they hang from the cave roof). The cave is of length N (where N is an even number) and of height H. The first obstacle is a stalagmite, and then stalactites and stalagmites go alternatively. In the picture there is an example cave of length 14 and of height 5 (the picture matches the second test example).


Image: japanskabuba1

The Japanese bug doesn’t want to avoid the barriers, so it chooses one of the H levels and flies from one side of the cave to the other, and uses its kung-fu skills to batter down all the blocks on the way. For example, if it chooses the forth level up the cave floor from the previous picture, it would demolish eight obstacles.


Image: japanskabuba2

In this example the bug would be less tired if it chose the first or the fifth level, because it would destroy seven obstacles in that case. The dimensions of the cave and the length of all the obstacles are given. Write a program that determines the smallest possible number of obstacles the bug must batter down in order to pass to the other side, and the number of levels that contain that number.


InputIn the first row of the standard input there are natural numbers N and H, 2<= N <= 200000, 2<=H <= 500000, which are the cave dimensions. N is an even number. In the next N lines there are the lengths of all of the obstacles in the given order, which are natural numbers less than H.

OutputIn the first and only line of the standard output, write the two integers separated by a space, the smallest number of obstacles the bug must demolish and the number of levels containing the smallest number of obstacles.

Input :
6 7
1
5
3
3
5
1

Output:
2 3

Input :
14 5
1
3
4
2
2
4
3
4
3
3
3
2
3
3

Output:
7 2

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.