League of Overwatch at Moloco (Easy)
InterviewTime limit2sMemory limit512 MB
Given a conflict graph, decide whether the vertices can be split into two non-empty groups so every conflicting pair is separated.
Problem
Every so often the employees of Moloco split into two groups and play a best of five series of League of Overwatch. Some pairs of employees are hardcore gamers who have already played together as a duo, so the company separates each such pair for this event to keep it enjoyable for beginners.
Moloco has employees, numbered 1 through .
There are known pairs : employees and played a duo game in the past, so they must end up in different groups.
Decide whether the employees can be split into two non-empty groups so that every employee belongs to exactly one group and no pair has both of its members in the same group.
Input
The first line contains two integers and (, ).
Each of the next lines contains two integers and (). It is guaranteed that for every . The same pair can appear more than once.
Output
Print one line containing either POSSIBLE or IMPOSSIBLE.
Hint
In the second example, splitting the employees into and satisfies every constraint.