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



g = {}

n_path = 0

for i in range(N):

    g[i] = []

for _ in range(M):

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

    a, b = a-1, b-1

    g[a].append(b)

    g[b].append(a)





def advance(v, passed):



    global n_path

    passed.append(v)

    if len(passed) == N:

        n_path += 1



    for n in g[v]:

        if n not in passed:

            advance(n, passed)



    passed.remove(v)





advance(0, [])

print(n_path)

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



g = {}

n_path = 0

for i in range(N):

    g[i] = set()

for _ in range(M):

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

    a, b = a-1, b-1

    g[a].add(b)

    g[b].add(a)



dp = [[0 for _ in range(N)] for _ in range(1 << N)]

dp[1][0] = 1



for bit in range(1 << N):

    for v in range(N):



        if bit & (1 << v) is False:

            continue



        sub = bit ^ (1 << v)



        for u in range(N):

            if (v in g[u]) and (sub & (1 << u)):

                dp[bit][v] += dp[sub][u]



print((sum(dp[-1])))

N, M = list(map(int, input().split()))
g = {}
n_path = 0
for i in range(N):
    g[i] = []
for _ in range(M):
    a, b = list(map(int, input().split()))
    a, b = a - 1, b - 1
    g[a].append(b)
    g[b].append(a)


def advance(v, passed):
    global n_path
    passed.append(v)
    if len(passed) == N:
        n_path += 1
    for n in g[v]:
        if n not in passed:
            advance(n, passed)
    passed.remove(v)


advance(0, [])
print(n_path)

N, M = list(map(int, input().split()))
g = {}
n_path = 0
for i in range(N):
    g[i] = set()
for _ in range(M):
    a, b = list(map(int, input().split()))
    a, b = a - 1, b - 1
    g[a].add(b)
    g[b].add(a)
dp = [[0 for _ in range(N)] for _ in range(1 << N)]
dp[1][0] = 1
for bit in range(1 << N):
    for v in range(N):
        if bit & (1 << v) is False:
            continue
        sub = bit ^ (1 << v)
        for u in range(N):
            if (v in g[u]) and (sub & (1 << u)):
                dp[bit][v] += dp[sub][u]
print((sum(dp[-1])))

-    g[i] = [] +    g[i] = set() -    g[a].append(b) -    g[b].append(a) - - -def advance(v, passed): -    global n_path -    passed.append(v) -    if len(passed) == N: -        n_path += 1 -    for n in g[v]: -        if n not in passed: -            advance(n, passed) -    passed.remove(v) - - -advance(0, []) -print(n_path) +    g[a].add(b) +    g[b].add(a) +dp = [[0 for _ in range(N)] for _ in range(1 << N)] +dp[1][0] = 1 +for bit in range(1 << N): +    for v in range(N): +        if bit & (1 << v) is False: +            continue +        sub = bit ^ (1 << v) +        for u in range(N): +            if (v in g[u]) and (sub & (1 << u)): +                dp[bit][v] += dp[sub][u] +print((sum(dp[-1])))