import Control.Monad
main=do
 [n,m]<-map read.words<$>getLine
 ed<-replicateM m (map ((\n->n-1).read).words<$>getLine)
 print(f n ed [(0,take n (repeat 0))] 0)
  where f _ _ [] ans = ans
        f n ed ((ve,arc):st) ans = f n ed ((g ve arc ed)++st) (if (sum arc)==(n-1) then (ans+1) else ans)
        g ve arc [] = []
        g ve arc ([a,b]:ed) | ve==a = if (arc!!b)==0 then ((h ve b arc):(g ve arc ed)) else (g ve arc ed)
                            | ve==b = if (arc!!a)==0 then ((h ve a arc):(g ve arc ed)) else (g ve arc ed)
                            |otherwise = g ve arc ed
        h ve a arc = (a,(take ve arc)++(1:(drop (ve+1) arc)))