Harry ("harrybob") has just been born! As a newborn baby, he is given $N$ numbers. He asks you a question: "Is it possible to form an equation with some of these numbers?". To be precise, you must choose at least two numbers, add in an equal sign and plus signs or minus signs appropriately to form a proper mathematical equation. As Harry wants a challenge, you do not need to report the equation, if one is possible. Can you help Harry?
Input
The first line consists of one integer, $N$.
The second line consists of $N$ integers, the numbers $a_i$ given to Harry.
Output
Output the answer to Harry's question, which is either Possible
or Impossible
.
Constraints
For all testcases: $2 \le N \le 15$, $1 \le a_i \le 10^9$
Subtask 1 (10%): $N \le 3$
Subtask 2 (40%): $a_i \le 10^5$
Subtask 3 (50%): No other constraints
Sample Test Cases
Input | Output | |
---|---|---|
6 2 2 4 1 6 9 |
Possible | |
These two equations can be formed: 2 = 2 and 4 - 1 = 9 - 6 . |
||
4 3 5 4 10 |
Impossible | |
It can be proven no proper mathematical equations can be written with these numbers. |
Scoring: Per Subtask
Authored by s17f18
Appeared in 2024 Mini Contest 2