Problem I
Count von Walken's Fence

The old Count von Walken ponders along the fence of his backyard. The fence has a repeating pattern with poles in the ground at equal distances. Since von Walken has nothing better to do, he counts the number of steps he takes between each pole.
The distance between two consecutive poles turns out not to be an integer multiple of the length of his steps because sometimes he takes two steps between the poles, and sometimes he takes three steps.
![\includegraphics[width=1\textwidth ]{figure}](/problems/vonwalken/file/statement/en/img-0002.png)
Von Walken knows that his steps are always 1 meter long, so he starts thinking of what the distance between the poles may be. “It must be more than 2 meters, since I occasionally can fit 3 steps between the poles, but it must be less than 3 meters, since I sometimes only fit 2 steps in between.”
Task
Given a list of step counts and a distance
To avoid problems with floating point numbers, the result is
guaranteed to be the same even if any pole is moved up to
Input
The input consists of a line containing the real number
Output
The program should print “possible” if
Sample Input 1 | Sample Output 1 |
---|---|
2.505 4 2 2 3 2 |
impossible |
Sample Input 2 | Sample Output 2 |
---|---|
2.1 4 2 2 3 2 |
possible |