import Data.List
import qualified Data.Set as Set
import qualified Data.ByteString.Char8 as BC
import Data.Maybe

type Set = Set.Set Int

toTuple [a, b] = (a, b)

readIntsLines :: IO [(Int, Int)]
readIntsLines = map (toTuple . map (fst . fromJust . BC.readInt) . BC.words) . BC.lines <$> BC.getContents

solve :: [(Int, Int)] -> Int -> Set -> Bool
solve [] _ _ = False
solve ((a, b):abs) n s
  | a == 1 = solve abs n $ Set.insert b s
  | b == n = (a `elem` s) || solve abs n s
  | otherwise = solve abs n s

main :: IO ()
main = do
  [n, m] <- map read . words <$> getLine
  ls <- sortOn fst <$> readIntsLines
  putStrLn $ if solve ls n Set.empty then "POSSIBLE" else "IMPOSSIBLE"