Alberta Collegiate Programming Contest 2018

Start

2018-10-27 18:00 UTC

Alberta Collegiate Programming Contest 2018

End

2018-10-27 23:00 UTC
The end is near!
Contest is over.
Not yet started.
Contest is starting in -46 days 20:30:25

Time elapsed

5:00:00

Time remaining

0:00:00

Problem E
Eating Out

Alice, Bob, and Clara are eating at a new restaurant today. They’re having trouble deciding what to order, so Alice proposes that they each pick some items from the menu, and then they will order the items that everyone picked. The menu has $m$ items, and Alice, Bob, and Clara will order $a$, $b$, and $c$ items respectively. Is it possible for them to pick some items such that no item is picked by everyone?

Input

The input contains a single line with four integers, $m$, $a$, $b$, $c$, where $1\leq m\leq 100,000$, and $1\leq a, b, c\leq m$.

Output

If it’s possible for Alice, Bob, and Clara to pick some item such that no item on the menu is picked by everyone, print “possible” (without quotes). Otherwise, print “impossible”.

Sample Input 1 Sample Output 1
6 2 2 2
possible
Sample Input 2 Sample Output 2
1 1 1 1
impossible