#AGC012E. [AGC012E] Camel and Oases

[AGC012E] Camel and Oases

Score : 10001000 points

Problem Statement

There are NN oases on a number line. The coordinate of the ii-th oases from the left is xix_i.

Camel hopes to visit all these oases. Initially, the volume of the hump on his back is VV. When the volume of the hump is vv, water of volume at most vv can be stored. Water is only supplied at oases. He can get as much water as he can store at a oasis, and the same oasis can be used any number of times.

Camel can travel on the line by either walking or jumping:

  • Walking over a distance of dd costs water of volume dd from the hump. A walk that leads to a negative amount of stored water cannot be done.
  • Let vv be the amount of water stored at the moment. When v>0v>0, Camel can jump to any point on the line of his choice. After this move, the volume of the hump becomes v/2v/2 (rounded down to the nearest integer), and the amount of stored water becomes 00.

For each of the oases, determine whether it is possible to start from that oasis and visit all the oases.

Constraints

  • 2N,V2×1052 \leq N,V \leq 2 \times 10^5
  • 109x1<x2<...<xN109-10^9 \leq x_1 < x_2 < ... < x_N \leq 10^9
  • VV and xix_i are all integers.

Input

Input is given from Standard Input in the following format:

NN VV

x1x_1 x2x_2 ...... xNx_{N}

Output

Print NN lines. The ii-th line should contain Possible if it is possible to start from the ii-th oasis and visit all the oases, and Impossible otherwise.

3 2
1 3 6
Possible
Possible
Possible

It is possible to start from the first oasis and visit all the oases, as follows:

  • Walk from the first oasis to the second oasis. The amount of stored water becomes 00.
  • Get water at the second oasis. The amount of stored water becomes 22.
  • Jump from the second oasis to the third oasis. The amount of stored water becomes 00, and the volume of the hump becomes 11.
7 2
-10 -4 -2 0 2 4 10
Impossible
Possible
Possible
Possible
Possible
Possible
Impossible

A oasis may be visited any number of times.

16 19
-49 -48 -33 -30 -21 -14 0 15 19 23 44 52 80 81 82 84
Possible
Possible
Possible
Possible
Possible
Possible
Possible
Possible
Possible
Possible
Possible
Possible
Impossible
Impossible
Impossible
Impossible