R. Zoo Management
time limit per test
5 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
3 3
1 4
4 7
7 1
1 2
2 3
1 3
Output
possible
Input
2 1
1 2
2 1
1 2
Output
impossible
Input
5 6
10 40
20 30
30 50
40 20
50 10
1 2
2 3
1 3
3 4
3 5
4 5
Output
possible
Input
4 4
10 10
10 20
20 10
20 20
1 2
2 3
3 4
1 4
Output
impossible