import Data.List
import Control.Monad

main = do
    [n, m] <- map readInt . words <$> getLine
    xs <- map (map readInt . words) <$> replicateM m getLine

    putStrLn $ if findRoute 1 n 1 xs n
        then "POSSIBLE"
        else "IMPOSSIBLE"

    where
        readInt = read :: String -> Int
        findRoute i j t xs n
            | t > 2 = False
            | elem [i, j] xs = True
            | elem [j, i] xs = True
            | all (\x -> x !! 0 /= i) xs = False
            | all (\x -> x !! 1 /= j) xs = False
            | otherwise = any
                (\k -> (findRoute i k (t + 1) xs n) && (findRoute j k (t + 1) xs n))
                $ [1 .. n] \\ [i, j]