#Lutece2838. Didn't I Say to Make My Abilities Average in the Next Life?!

Didn't I Say to Make My Abilities Average in the Next Life?!

Migrated from Lutece 2838 Didn't I Say to Make My Abilities Average in the Next Life?!

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

When reincarnating in the fantasy world, Kurihara asked the Creator to grant her the ability to average. But the Creator does really badly on math, considering average as half of the sum of the maximum and minimum among values.

Initially, there's no creature in the fantasy world. There're nn events that will happen.

  • A new creature with the ability value vv was created.
  • The Creator will grant the ability to Kurihara. He will calculate the "average" ability value among the last mm created creature(s) with his own definition. If the number of kinds of creatures is less than mm, he will calculate the "average" ability value of all these creatures.

Kurihara would like to know the ability value she will be granted each time.

Input

The first line contains two integers n,m (2n105,1mn)n,m\ (2\le n\le 10^5, 1\le m\le n), indicating the number of events and the constant mentioned above.

For the next nn lines, each line indicates an event:

  • 1 v (0v109)\texttt{1}\ v\ (0\le v\le 10^9): A new creature with ability value vv was created;
  • 2\texttt{2}: The Creator is granting the ability to Kurihara.

It's guaranteed that the first event is kind 1\texttt{1}.

Output

For each 2\texttt{2} event, output one real number per line indicating the answer. The answer should be rounded to one decimal place.

Samples

4 3
1 1
1 2
1 5
2
3.0

Resources

The 18th UESTC Programming Contest Preliminary