import Control.Monad
import qualified Data.Set as Set
main=do
 [n,m]<-map read.words<$>getLine
 ab<-replicateM m (words<$>getLine)
 putStrLn(h(Set.fromList(f n ab))(Set.fromList(g 1 ab)))
  where f n ab = [x!!0|x<-ab,(x!!1)==(show n)]
        g n ab = [x!!1|x<-ab,(x!!0)==(show n)]
        h a b = if (Set.intersection a b)==Set.empty then"IMPOSSIBLE"else"POSSIBLE"