Freestyle Masonry

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

Fred got a simple task, he just has to build a w×hw\times h wall. To make this even easier, he was provided with enough 2×12\times1 bricks and also a few 1×11\times1 bricks to complete the wall. Knowing that this task should not be too hard, Fred went to work and started building the wall without thinking too much about the design. Only when he ran out of 1×11\times1 bricks, Fred noticed that this might have been a bad idea...

Figure F.1: Visualization of Sample Input 22. The red bricks have already been placed by Fred. The blue bricks still need to be placed to complete the wall (the only possible design in this case).

Maybe he should have made a plan before starting to build the wall, but now it is too late. Fred only has a bunch of 2×12\times1 bricks left and wants to finish the wall. Can he still complete it with the remaining 2×12\times 1 bricks? Note that the wall to be built should have a width of exactly ww units and a height of exactly hh units.

입력

The input consists of:

  • One line with two integers ww and hh (1w21051\leq w\leq2\cdot10^5, 1h1061\leq h\leq10^6), the width and height of the wall Fred wants to build.
  • One line with ww integers h_1,,h_nh\_1,\dots,h\_n (0h_i1060\leq h\_i\leq 10^6), where h_ih\_i is the current height of the wall at position ii.

출력

Output "possible" if Fred can complete his wall and "impossible" otherwise.