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



path = [[0]*(N+1) for _ in range(N+1)]



for i in range(M):

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

    path[a][b] = 1

    path[b][a] = 1



visited = [0]*(N+1)



def dfs(now,depth):

    if visited[now]:

        return 0

    if depth == N:

        return 1 # 最後まで探索したらはじめて+1

    

    visited[now] = 1

    

    total_paths = 0

    

    for i in range(1,N+1):

        if path[now][i]:

            total_paths += dfs(i, depth + 1)

            

    visited[now] = 0

    

    return total_paths



print((dfs(1,1)))
def dfs(g,v,depth):

    if seen[v]==True:return 0

    if depth==n:return 1

    seen[v] = True

    paths = 0

    for next_v in g[v]:

        paths += dfs(g,next_v,depth+1)

    seen[v] = False

    return paths

        

n,m = list(map(int,input().split()))



g = [[]*(n+1) for _ in range(n+1)]



for _ in range(m):

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

    g[a].append(b)

    g[b].append(a)



seen = [False]*(n+1)

    

print((dfs(g,1,1)))
N, M = list(map(int, input().split()))
path = [[0] * (N + 1) for _ in range(N + 1)]
for i in range(M):
    a, b = list(map(int, input().split()))
    path[a][b] = 1
    path[b][a] = 1
visited = [0] * (N + 1)


def dfs(now, depth):
    if visited[now]:
        return 0
    if depth == N:
        return 1  # 最後まで探索したらはじめて+1
    visited[now] = 1
    total_paths = 0
    for i in range(1, N + 1):
        if path[now][i]:
            total_paths += dfs(i, depth + 1)
    visited[now] = 0
    return total_paths


print((dfs(1, 1)))

def dfs(g, v, depth):
    if seen[v] == True:
        return 0
    if depth == n:
        return 1
    seen[v] = True
    paths = 0
    for next_v in g[v]:
        paths += dfs(g, next_v, depth + 1)
    seen[v] = False
    return paths


n, m = list(map(int, input().split()))
g = [[] * (n + 1) for _ in range(n + 1)]
for _ in range(m):
    a, b = list(map(int, input().split()))
    g[a].append(b)
    g[b].append(a)
seen = [False] * (n + 1)
print((dfs(g, 1, 1)))

-N, M = list(map(int, input().split())) -path = [[0] * (N + 1) for _ in range(N + 1)] -for i in range(M): -    a, b = list(map(int, input().split())) -    path[a][b] = 1 -    path[b][a] = 1 -visited = [0] * (N + 1) +def dfs(g, v, depth): +    if seen[v] == True: +        return 0 +    if depth == n: +        return 1 +    seen[v] = True +    paths = 0 +    for next_v in g[v]: +        paths += dfs(g, next_v, depth + 1) +    seen[v] = False +    return paths -def dfs(now, depth): -    if visited[now]: -        return 0 -    if depth == N: -        return 1  # 最後まで探索したらはじめて+1 -    visited[now] = 1 -    total_paths = 0 -    for i in range(1, N + 1): -        if path[now][i]: -            total_paths += dfs(i, depth + 1) -    visited[now] = 0 -    return total_paths - - -print((dfs(1, 1))) +n, m = list(map(int, input().split())) +g = [[] * (n + 1) for _ in range(n + 1)] +for _ in range(m): +    a, b = list(map(int, input().split())) +    g[a].append(b) +    g[b].append(a) +seen = [False] * (n + 1) +print((dfs(g, 1, 1)))