import sys

sys.setrecursionlimit(10**7) #再帰関数の呼び出し制限

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

A = [[0]* N for _ in range(N)]

for i in range(M):

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

    A[a-1][b-1] = 1

    A[b-1][a-1] = 1

visited=[1]+[0]*(N-1)

def DFS(now, visited):

    ans = 0

    if not 0 in visited:

        return 1

    for i in range(N):

        if A[now][i] == 0:

            continue

        if visited[i] == 1:

            continue

        visited[i] = 1

        ans += DFS(i, visited)

        visited[i] = 0

    return ans

print((DFS(0, visited)))
N, M = list(map(int, input().split()))



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

for i in range(M):

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

    G[a-1].append(b-1)

    G[b-1].append(a-1)



visited = [0]*N

visited[0] = 1



def dfs(v, visited):

    if 0 not in visited:

        return 1



    ans = 0

    for i in G[v]:

        if visited[i] == 0:

            visited[i] = 1

            ans += dfs(i, visited)

            visited[i] = 0



    return ans



print((dfs(0, visited)))
import sys

sys.setrecursionlimit(10**7)  # 再帰関数の呼び出し制限
N, M = list(map(int, input().split()))
A = [[0] * N for _ in range(N)]
for i in range(M):
    a, b = list(map(int, input().split()))
    A[a - 1][b - 1] = 1
    A[b - 1][a - 1] = 1
visited = [1] + [0] * (N - 1)


def DFS(now, visited):
    ans = 0
    if not 0 in visited:
        return 1
    for i in range(N):
        if A[now][i] == 0:
            continue
        if visited[i] == 1:
            continue
        visited[i] = 1
        ans += DFS(i, visited)
        visited[i] = 0
    return ans


print((DFS(0, visited)))

N, M = list(map(int, input().split()))
G = [[] for i in range(N)]
for i in range(M):
    a, b = list(map(int, input().split()))
    G[a - 1].append(b - 1)
    G[b - 1].append(a - 1)
visited = [0] * N
visited[0] = 1


def dfs(v, visited):
    if 0 not in visited:
        return 1
    ans = 0
    for i in G[v]:
        if visited[i] == 0:
            visited[i] = 1
            ans += dfs(i, visited)
            visited[i] = 0
    return ans


print((dfs(0, visited)))

-import sys - -sys.setrecursionlimit(10**7)  # 再帰関数の呼び出し制限 -A = [[0] * N for _ in range(N)] +G = [[] for i in range(N)] -    A[a - 1][b - 1] = 1 -    A[b - 1][a - 1] = 1 -visited = [1] + [0] * (N - 1) +    G[a - 1].append(b - 1) +    G[b - 1].append(a - 1) +visited = [0] * N +visited[0] = 1 -def DFS(now, visited): +def dfs(v, visited): +    if 0 not in visited: +        return 1 -    if not 0 in visited: -        return 1 -    for i in range(N): -        if A[now][i] == 0: -            continue -        if visited[i] == 1: -            continue -        visited[i] = 1 -        ans += DFS(i, visited) -        visited[i] = 0 +    for i in G[v]: +        if visited[i] == 0: +            visited[i] = 1 +            ans += dfs(i, visited) +            visited[i] = 0 -print((DFS(0, visited))) +print((dfs(0, visited)))