import Control.Monad
import Control.Applicative
import Data.List
import qualified Data.Map as Map
import Data.Array
strToInt s = (read :: String -> Int) s

main = do
   [n,m] <- (map strToInt . words) <$> getLine
   ab <- replicateM m (map strToInt . words <$> getLine)
   let f1 = Map.fromList [ (last a , "True") | a <- ab , (head a) == 1]
   let f2 = Map.fromList [ (head a , "True") | a <- ab , (last a) == n]
   
   let ans = [i|i<-[1..n] , (Map.lookup i f1 == Just "True" && Map.lookup i f2 == Just "True")]
   
   if ans == []
   then putStrLn "IMPOSSIBLE"
   else putStrLn "POSSIBLE"