

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

path_matrix=[]

for i in range(N):

    path_matrix.append([False]*N)



for i in range(M):

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

    path_matrix[a-1][b-1]=True

    path_matrix[b-1][a-1]=True

view=[False]*N



def path(x,depth):

    if view[x-1]:

        return False

    

    if depth==N-1:

        return True



    view[x-1]=True

    total_ans=0

    for i in range(N):

        if path_matrix[x-1][i]:

            total_ans+=int(path(i+1,depth+1))

    

    view[x-1]=False



    return total_ans



print((path(1,0)))
N,M=list(map(int,input().split()))

A=[[] for i in range(N)]



for i in range(M):

    x,y=list(map(int,input().split()))

    A[x-1].append(y)

    A[y-1].append(x)



color=["W" for i in range(N)]



clear=["B" for i in range(N)]



def path(x,d):

    if color[x-1]=="B":

        return False

        

    color[x-1]="B"



    if color==clear:

        color[x-1]="W"

        return True

    

    ans=0

    for i in range(len(A[x-1])):

        ans+=int(path(A[x-1][i],d+1))



    color[x-1]="W"

    return ans



print((path(1,0)))

N, M = list(map(int, input().split()))
path_matrix = []
for i in range(N):
    path_matrix.append([False] * N)
for i in range(M):
    a, b = list(map(int, input().split()))
    path_matrix[a - 1][b - 1] = True
    path_matrix[b - 1][a - 1] = True
view = [False] * N


def path(x, depth):
    if view[x - 1]:
        return False
    if depth == N - 1:
        return True
    view[x - 1] = True
    total_ans = 0
    for i in range(N):
        if path_matrix[x - 1][i]:
            total_ans += int(path(i + 1, depth + 1))
    view[x - 1] = False
    return total_ans


print((path(1, 0)))

N, M = list(map(int, input().split()))
A = [[] for i in range(N)]
for i in range(M):
    x, y = list(map(int, input().split()))
    A[x - 1].append(y)
    A[y - 1].append(x)
color = ["W" for i in range(N)]
clear = ["B" for i in range(N)]


def path(x, d):
    if color[x - 1] == "B":
        return False
    color[x - 1] = "B"
    if color == clear:
        color[x - 1] = "W"
        return True
    ans = 0
    for i in range(len(A[x - 1])):
        ans += int(path(A[x - 1][i], d + 1))
    color[x - 1] = "W"
    return ans


print((path(1, 0)))

-path_matrix = [] -for i in range(N): -    path_matrix.append([False] * N) +A = [[] for i in range(N)] -    a, b = list(map(int, input().split())) -    path_matrix[a - 1][b - 1] = True -    path_matrix[b - 1][a - 1] = True -view = [False] * N +    x, y = list(map(int, input().split())) +    A[x - 1].append(y) +    A[y - 1].append(x) +color = ["W" for i in range(N)] +clear = ["B" for i in range(N)] -def path(x, depth): -    if view[x - 1]: +def path(x, d): +    if color[x - 1] == "B": -    if depth == N - 1: +    color[x - 1] = "B" +    if color == clear: +        color[x - 1] = "W" -    view[x - 1] = True -    total_ans = 0 -    for i in range(N): -        if path_matrix[x - 1][i]: -            total_ans += int(path(i + 1, depth + 1)) -    view[x - 1] = False -    return total_ans +    ans = 0 +    for i in range(len(A[x - 1])): +        ans += int(path(A[x - 1][i], d + 1)) +    color[x - 1] = "W" +    return ans