Under construction

Still being built. Things may change

League of Overwatch at Moloco (Easy)

Interview

Time limit2sMemory limit512 MB

Summary
Given a conflict graph, decide whether the vertices can be split into two non-empty groups so every conflicting pair is separated.
Level

Easy3 of 10

Topics
Graph, BFS
Solved
No attempts yet

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 nn employees, numbered 1 through nn.

There are mm known pairs (fi,si)(f_i, s_i): employees fif_i and sis_i played a duo game in the past, so they must end up in different groups.

Decide whether the nn employees can be split into two non-empty groups so that every employee belongs to exactly one group and no pair (fi,si)(f_i, s_i) has both of its members in the same group.

Input

The first line contains two integers nn and mm (1≤n≤161 \le n \le 16, 1≤m≤1501 \le m \le 150).

Each of the next mm lines contains two integers fif_i and sis_i (1≤fi,si≤n1 \le f_i, s_i \le n). It is guaranteed that fi≠sif_i \ne s_i for every ii. 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 {2}\{2\} and {1,3}\{1, 3\} satisfies every constraint.

Examples3

  1. Example 1

    Input
    3 4
    1 2
    2 3
    3 1
    2 1
    
    Expected output
    IMPOSSIBLE
    
  2. Example 2

    Input
    3 3
    1 2
    1 2
    2 3
    
    Expected output
    POSSIBLE
    
  3. Example 3

    Input
    2 1
    1 2
    
    Expected output
    POSSIBLE