import Control.Monad
import Data.List
import Data.Maybe
import qualified Data.Set as S

main :: IO ()
main = do
    [n, m] <- getInts
    edges <- fmap sort $ forM [1..m] $ \_ -> do
        [a, b] <- getInts
        pure (a, b)
    putStrLn $ if fst (edges !! 0) /= 1
                    then "0"
                    else show $ solve 1 [2..n] $ S.fromList edges


type Node = Int
type Edge = (Node, Node)

solve :: Node -> [Node] -> S.Set Edge -> Int
solve _ [] _ = 1
solve current unvisited edges =
    if S.null edges
       then 0
       else sum $ map go nextNodes
    where
        nextTarget = S.map fromJust . S.delete Nothing $ S.map (getConnected current) edges
        nextNodes = map fst $ S.toList nextTarget
        nextEdges = S.map snd nextTarget
        go nextNode = solve nextNode (filter (/= nextNode) unvisited) $ S.difference edges nextEdges

{-
solve :: Node -> [Node] -> [Edge] -> Int
solve _ [] _ = 1
solve _ _ [] = 0
solve current unvisited edges =
    sum $ map go nextTarget
    where
        nextTarget = mapMaybe (getConnected current) edges
        nextNodes = map fst nextTarget
        nextEdges = map snd nextTarget
        go (nextNode, nextEdge) = solve nextNode (filter (/= nextNode) unvisited) (filter (/= nextEdge) edges)
-}

getConnected :: Node -> Edge -> Maybe (Node, Edge)
getConnected current e@(a, b)
    | current == a = Just (b, e)
    | current == b = Just (a, e)
    | otherwise = Nothing

getInts :: IO [Int]
getInts = map read . words <$> getLine
