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

a = [input().rstrip().split() for j in range(m)]

cnt = 0#現在の経路

# a

visited=[False]*n#もう訪問したか

graph = [[False for i in range(n)] for j in range(n)]#どこが連結されているか

# graph

for i in range(0,m):

    x = int(a[i][0])-1

    y = int(a[i][1])-1

    graph[x][y]=graph[y][x]=True

# graph

    

def DFS(v,n,visited):

    # print(visited)

    all_visited = True #bool

    for i in range(0,n):

        if(visited[i]==0):

            all_visited = False

    if(all_visited):

        return 1



    ret = 0



    for i in range(0,n):

        if(graph[v][i]==False):

            continue

        if(visited[i]):

            continue



        visited[i] = True

        ret += DFS(i,n,visited)

        visited[i] = False



    return ret

visited[0]=True

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

ab = [list(map(int,input().split())) for i in range(M)]



from collections import defaultdict



memo = defaultdict(list)



for ele in ab:

    memo[ele[0]-1].append(ele[1]-1)

    memo[ele[1]-1].append(ele[0]-1)



que = []

visited = defaultdict(int)

ans = [0]



def dfs(visited,node,pre_node,tmp_sum):

    if tmp_sum == N:

        ans[0] += 1

        return



    for nn in memo[node]:

        if nn == pre_node: continue

        if visited[nn]==1: continue

        visited[nn] = 1

        dfs(visited,nn,node,tmp_sum+1)

        visited[nn] = 0



    return

        

flag = [False]

visited[0]=1

dfs(visited,0,-1,1)



print((ans[0]))
n, m = list(map(int, input().split()))
a = [input().rstrip().split() for j in range(m)]
cnt = 0  # 現在の経路
# a
visited = [False] * n  # もう訪問したか
graph = [[False for i in range(n)] for j in range(n)]  # どこが連結されているか
# graph
for i in range(0, m):
    x = int(a[i][0]) - 1
    y = int(a[i][1]) - 1
    graph[x][y] = graph[y][x] = True
# graph
def DFS(v, n, visited):
    # print(visited)
    all_visited = True  # bool
    for i in range(0, n):
        if visited[i] == 0:
            all_visited = False
    if all_visited:
        return 1
    ret = 0
    for i in range(0, n):
        if graph[v][i] == False:
            continue
        if visited[i]:
            continue
        visited[i] = True
        ret += DFS(i, n, visited)
        visited[i] = False
    return ret


visited[0] = True
print((DFS(0, n, visited)))

N, M = list(map(int, input().split()))
ab = [list(map(int, input().split())) for i in range(M)]
from collections import defaultdict

memo = defaultdict(list)
for ele in ab:
    memo[ele[0] - 1].append(ele[1] - 1)
    memo[ele[1] - 1].append(ele[0] - 1)
que = []
visited = defaultdict(int)
ans = [0]


def dfs(visited, node, pre_node, tmp_sum):
    if tmp_sum == N:
        ans[0] += 1
        return
    for nn in memo[node]:
        if nn == pre_node:
            continue
        if visited[nn] == 1:
            continue
        visited[nn] = 1
        dfs(visited, nn, node, tmp_sum + 1)
        visited[nn] = 0
    return


flag = [False]
visited[0] = 1
dfs(visited, 0, -1, 1)
print((ans[0]))

-n, m = list(map(int, input().split())) -a = [input().rstrip().split() for j in range(m)] -cnt = 0  # 現在の経路 -# a -visited = [False] * n  # もう訪問したか -graph = [[False for i in range(n)] for j in range(n)]  # どこが連結されているか -# graph -for i in range(0, m): -    x = int(a[i][0]) - 1 -    y = int(a[i][1]) - 1 -    graph[x][y] = graph[y][x] = True -# graph -def DFS(v, n, visited): -    # print(visited) -    all_visited = True  # bool -    for i in range(0, n): -        if visited[i] == 0: -            all_visited = False -    if all_visited: -        return 1 -    ret = 0 -    for i in range(0, n): -        if graph[v][i] == False: -            continue -        if visited[i]: -            continue -        visited[i] = True -        ret += DFS(i, n, visited) -        visited[i] = False -    return ret +N, M = list(map(int, input().split())) +ab = [list(map(int, input().split())) for i in range(M)] +from collections import defaultdict + +memo = defaultdict(list) +for ele in ab: +    memo[ele[0] - 1].append(ele[1] - 1) +    memo[ele[1] - 1].append(ele[0] - 1) +que = [] +visited = defaultdict(int) +ans = [0] -visited[0] = True -print((DFS(0, n, visited))) +def dfs(visited, node, pre_node, tmp_sum): +    if tmp_sum == N: +        ans[0] += 1 +        return +    for nn in memo[node]: +        if nn == pre_node: +            continue +        if visited[nn] == 1: +            continue +        visited[nn] = 1 +        dfs(visited, nn, node, tmp_sum + 1) +        visited[nn] = 0 +    return + + +flag = [False] +visited[0] = 1 +dfs(visited, 0, -1, 1) +print((ans[0]))