import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
import qualified Data.Set as S

solve :: Int -> [(Int,Int)] -> Bool
solve n m =
    let p1 = S.fromList [ fst i | i <- m, snd i == n]
        p2 = S.fromList [ snd i | i <- m, fst i == 1]
     in not . S.null $ S.intersection p1 p2

main :: IO ()
main = do
    [n,_] <- map read . words <$> getLine :: IO [Int]
    ab <- map ((\[a,b] -> (a,b)) . map (fst . fromJust . BS.readInt) . BS.words)
        . BS.lines <$> BS.getContents :: IO [(Int,Int)]
    putStrLn $ if solve n ab then "POSSIBLE" else "IMPOSSIBLE"
