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

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

for _ in range(m):

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

    graph[a].append(b)

    graph[b].append(a)



visit = [0] * (n + 1)





def dfs(now, depth):

    if visit[now]:

        return 0

    if depth == n:

        return 1



    count = 0

    visit[now] = 1

    if graph[now]:

        for i in graph[now]:

            count += dfs(i, depth + 1)

    visit[now] = 0



    return count





ans = dfs(1, 1)

print(ans)

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

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

for _ in range(m):

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

    graph[a].append(b)

    graph[b].append(a)



visit = [0] * (n + 1)

ans = 0





def dfs(now, depth):

    global ans

    if visit[now]:

        pass

    if depth == n:

        ans += 1



    visit[now] = 1

    if graph[now]:

        for i in graph[now]:

            if visit[i] == 0:

                dfs(i, depth + 1)

    visit[now] = 0





dfs(1, 1)

print(ans)

n, m = list(map(int, input().split()))
graph = [[] for _ in range(n + 1)]
for _ in range(m):
    a, b = list(map(int, input().split()))
    graph[a].append(b)
    graph[b].append(a)
visit = [0] * (n + 1)


def dfs(now, depth):
    if visit[now]:
        return 0
    if depth == n:
        return 1
    count = 0
    visit[now] = 1
    if graph[now]:
        for i in graph[now]:
            count += dfs(i, depth + 1)
    visit[now] = 0
    return count


ans = dfs(1, 1)
print(ans)

n, m = list(map(int, input().split()))
graph = [[] for _ in range(n + 1)]
for _ in range(m):
    a, b = list(map(int, input().split()))
    graph[a].append(b)
    graph[b].append(a)
visit = [0] * (n + 1)
ans = 0


def dfs(now, depth):
    global ans
    if visit[now]:
        pass
    if depth == n:
        ans += 1
    visit[now] = 1
    if graph[now]:
        for i in graph[now]:
            if visit[i] == 0:
                dfs(i, depth + 1)
    visit[now] = 0


dfs(1, 1)
print(ans)

+ans = 0 +    global ans -        return 0 +        pass -        return 1 -    count = 0 +        ans += 1 -            count += dfs(i, depth + 1) +            if visit[i] == 0: +                dfs(i, depth + 1) -    return count -ans = dfs(1, 1) +dfs(1, 1)