v=[]

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

ans=[[] for i in range(n)]

for i in range(m):

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

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

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

def dfs(now,visited=[]):

    if len(visited)==n:

        v.append([visited])

        return

    for j in ans[now]:

        if j not in visited:

            dfs(j,visited+[j])

dfs(0,[0])

print((len(v)))

def DFS(now, visited):



    if len(visited) == n:

        ans.append(1)

        return



    for i in graph[now]:

        if not i in visited:

            DFS(i, visited + [i])





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

graph = [[] for i in range(n)]

ans = []



for i in range(m):

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

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

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



DFS(0,[0])



print((len(ans)))

v = []
n, m = list(map(int, input().split()))
ans = [[] for i in range(n)]
for i in range(m):
    a, b = list(map(int, input().split()))
    ans[a - 1].append((b - 1))
    ans[b - 1].append((a - 1))


def dfs(now, visited=[]):
    if len(visited) == n:
        v.append([visited])
        return
    for j in ans[now]:
        if j not in visited:
            dfs(j, visited + [j])


dfs(0, [0])
print((len(v)))

def DFS(now, visited):
    if len(visited) == n:
        ans.append(1)
        return
    for i in graph[now]:
        if not i in visited:
            DFS(i, visited + [i])


n, m = list(map(int, input().split()))
graph = [[] for i in range(n)]
ans = []
for i in range(m):
    a, b = list(map(int, input().split()))
    graph[a - 1].append(b - 1)
    graph[b - 1].append(a - 1)
DFS(0, [0])
print((len(ans)))

-v = [] +def DFS(now, visited): +    if len(visited) == n: +        ans.append(1) +        return +    for i in graph[now]: +        if not i in visited: +            DFS(i, visited + [i]) + + -ans = [[] for i in range(n)] +graph = [[] for i in range(n)] +ans = [] -    ans[a - 1].append((b - 1)) -    ans[b - 1].append((a - 1)) - - -def dfs(now, visited=[]): -    if len(visited) == n: -        v.append([visited]) -        return -    for j in ans[now]: -        if j not in visited: -            dfs(j, visited + [j]) - - -dfs(0, [0]) -print((len(v))) +    graph[a - 1].append(b - 1) +    graph[b - 1].append(a - 1) +DFS(0, [0]) +print((len(ans)))