N,M=list(map(int,input().split()))

import copy

a=[0]*M

b=[0]*M

for i in range(M):

    a[i],b[i]=list(map(int,input().split()))

D=[[1]]

def route(D):

    E=[]

    D1=copy.deepcopy(D)

    for j in range(len(D)):

        x=D[j][-1]

        for i in range(M):



            if a[i]==x:

                if not b[i] in D1[j]:

                    D[j]=copy.deepcopy(D1[j])

                    D[j].append(b[i])

                    E.append(D[j])

            elif b[i]==x:

                if not a[i] in D1[j]:

                    D[j]=copy.deepcopy(D1[j])

                    D[j].append(a[i])

                    E.append(D[j])

    return E

for i in range(N-1):

    D=copy.deepcopy(route(D))

print((len(D)))



    
def bit_DP(N,Adj):

    dp=[[0]*N for i in range(1<<N)]

    dp[1][0]=1

    for S in range(1<<N):

        for v in range(N):

            if (S&(1<<v))==0:

                continue

            sub=S^(1<<v)

            

            for u in range(N):

                if (sub&(1<<u)) and (Adj[u][v]):

                    dp[S][v]+=dp[sub][u]

    ans=sum(dp[(1<<N)-1][u] for u in range(1,N))

    return ans

def main():

    N,M=list(map(int,input().split()))

    Adj=[[0]*N for i in range(N)]

    for _ in range(M):

        a,b=list(map(int,input().split()))

        Adj[a-1][b-1]=1

        Adj[b-1][a-1]=1

    ans=bit_DP(N,Adj)

    print(ans)

if __name__=='__main__':

    main()
N, M = list(map(int, input().split()))
import copy

a = [0] * M
b = [0] * M
for i in range(M):
    a[i], b[i] = list(map(int, input().split()))
D = [[1]]


def route(D):
    E = []
    D1 = copy.deepcopy(D)
    for j in range(len(D)):
        x = D[j][-1]
        for i in range(M):
            if a[i] == x:
                if not b[i] in D1[j]:
                    D[j] = copy.deepcopy(D1[j])
                    D[j].append(b[i])
                    E.append(D[j])
            elif b[i] == x:
                if not a[i] in D1[j]:
                    D[j] = copy.deepcopy(D1[j])
                    D[j].append(a[i])
                    E.append(D[j])
    return E


for i in range(N - 1):
    D = copy.deepcopy(route(D))
print((len(D)))

def bit_DP(N, Adj):
    dp = [[0] * N for i in range(1 << N)]
    dp[1][0] = 1
    for S in range(1 << N):
        for v in range(N):
            if (S & (1 << v)) == 0:
                continue
            sub = S ^ (1 << v)
            for u in range(N):
                if (sub & (1 << u)) and (Adj[u][v]):
                    dp[S][v] += dp[sub][u]
    ans = sum(dp[(1 << N) - 1][u] for u in range(1, N))
    return ans


def main():
    N, M = list(map(int, input().split()))
    Adj = [[0] * N for i in range(N)]
    for _ in range(M):
        a, b = list(map(int, input().split()))
        Adj[a - 1][b - 1] = 1
        Adj[b - 1][a - 1] = 1
    ans = bit_DP(N, Adj)
    print(ans)


if __name__ == "__main__":
    main()

-N, M = list(map(int, input().split())) -import copy - -a = [0] * M -b = [0] * M -for i in range(M): -    a[i], b[i] = list(map(int, input().split())) -D = [[1]] +def bit_DP(N, Adj): +    dp = [[0] * N for i in range(1 << N)] +    dp[1][0] = 1 +    for S in range(1 << N): +        for v in range(N): +            if (S & (1 << v)) == 0: +                continue +            sub = S ^ (1 << v) +            for u in range(N): +                if (sub & (1 << u)) and (Adj[u][v]): +                    dp[S][v] += dp[sub][u] +    ans = sum(dp[(1 << N) - 1][u] for u in range(1, N)) +    return ans -def route(D): -    E = [] -    D1 = copy.deepcopy(D) -    for j in range(len(D)): -        x = D[j][-1] -        for i in range(M): -            if a[i] == x: -                if not b[i] in D1[j]: -                    D[j] = copy.deepcopy(D1[j]) -                    D[j].append(b[i]) -                    E.append(D[j]) -            elif b[i] == x: -                if not a[i] in D1[j]: -                    D[j] = copy.deepcopy(D1[j]) -                    D[j].append(a[i]) -                    E.append(D[j]) -    return E +def main(): +    N, M = list(map(int, input().split())) +    Adj = [[0] * N for i in range(N)] +    for _ in range(M): +        a, b = list(map(int, input().split())) +        Adj[a - 1][b - 1] = 1 +        Adj[b - 1][a - 1] = 1 +    ans = bit_DP(N, Adj) +    print(ans) -for i in range(N - 1): -    D = copy.deepcopy(route(D)) -print((len(D))) +if __name__ == "__main__": +    main()