import Control.Monad
import qualified Data.Set as S
main = do
  [n,m] <- map read . words <$> getLine
  abs <- replicateM m $ map read . words <$> getLine
  let s = S.fromList [b | [a,b] <- abs, a == 1]
      t = S.fromList [a | [a,b] <- abs, b == n]
  putStrLn $ if S.null $ S.intersection s t 
    then "IMPOSSIBLE"
    else "POSSIBLE"