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



v = []



for i in range(M):

    line = list(map(int, input().split()))

    v.append([x - 1 for x in line])



conn = []

for _ in range(N):

    conn.append([False] * N)



visited = [False] * N



for start, end in v:

    conn[start][end] = conn[end][start] = True



def dfs(now, depth):

    if visited[now]:

        return 0

    if depth == N - 1:

        return 1



    visited[now] = True

    ret = 0



    for i in range(N):

        if conn[now][i]:

            ret += dfs(i, depth + 1)

    

    visited[now] = False



    return ret



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



d = [[False for i in range(N)] for i in range(N)]

visited = [False] * N



for i in range(M):

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

    a -= 1

    b -= 1

    d[a][b] = True

    d[b][a] = True



def dfs(now, depth):

    if visited[now]:

        return 0

    if depth == N - 1:

        return 1

    

    ret = 0

    visited[now] = True



    for i in range(N):

        if d[now][i]:

            ret += dfs(i, depth + 1)

    

    visited[now] = False



    return ret



print((dfs(0,0)))
N, M = list(map(int, input().split()))
v = []
for i in range(M):
    line = list(map(int, input().split()))
    v.append([x - 1 for x in line])
conn = []
for _ in range(N):
    conn.append([False] * N)
visited = [False] * N
for start, end in v:
    conn[start][end] = conn[end][start] = True


def dfs(now, depth):
    if visited[now]:
        return 0
    if depth == N - 1:
        return 1
    visited[now] = True
    ret = 0
    for i in range(N):
        if conn[now][i]:
            ret += dfs(i, depth + 1)
    visited[now] = False
    return ret


print((dfs(0, 0)))

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


def dfs(now, depth):
    if visited[now]:
        return 0
    if depth == N - 1:
        return 1
    ret = 0
    visited[now] = True
    for i in range(N):
        if d[now][i]:
            ret += dfs(i, depth + 1)
    visited[now] = False
    return ret


print((dfs(0, 0)))

-v = [] +d = [[False for i in range(N)] for i in range(N)] +visited = [False] * N -    line = list(map(int, input().split())) -    v.append([x - 1 for x in line]) -conn = [] -for _ in range(N): -    conn.append([False] * N) -visited = [False] * N -for start, end in v: -    conn[start][end] = conn[end][start] = True +    a, b = list(map(int, input().split())) +    a -= 1 +    b -= 1 +    d[a][b] = True +    d[b][a] = True +    ret = 0 -    ret = 0 -        if conn[now][i]: +        if d[now][i]: