from sys import stdin





def dfs(e, ans, done, N, graph):

    if (1 << N) - 1 == done:

        ans += 1

        return ans

    for s in graph[e]:

        if done >> s & 1:

            continue

        done ^= 1 << s

        ans = dfs(s, ans, done, N, graph)

        done ^= 1 << s

    return ans





def main():

    lines = stdin.readlines()

    N, M = list(map(int, lines[0].split()))

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

    for i in range(1, M + 1):

        a, b = [int(x) - 1 for x in lines[i].split()]

        # 0-based indexing

        graph[a].append(b)

        graph[b].append(a)

    ans = 0

    print((dfs(0, ans, 1, N, graph)))

    return





main()

from sys import stdin

N = int()

memo = {}

graph = []





def dfs(e, done):

    if (1 << N) - 1 == done:

        return 1

    key = (e, done)

    if key in memo:

        return memo[key]

    ret = 0

    for s in graph[e]:

        if done >> s & 1:

            continue

        done ^= 1 << s

        ret += dfs(s, done)

        done ^= 1 << s

    memo[key] = ret

    return ret





def main():

    lines = stdin.readlines()

    global N

    N, M = list(map(int, lines[0].split()))

    global graph

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

    for i in range(1, M + 1):

        a, b = [int(x) - 1 for x in lines[i].split()]

        # 0-based indexing

        graph[a].append(b)

        graph[b].append(a)

    print((dfs(0, 1)))

    return





main()

from sys import stdin


def dfs(e, ans, done, N, graph):
    if (1 << N) - 1 == done:
        ans += 1
        return ans
    for s in graph[e]:
        if done >> s & 1:
            continue
        done ^= 1 << s
        ans = dfs(s, ans, done, N, graph)
        done ^= 1 << s
    return ans


def main():
    lines = stdin.readlines()
    N, M = list(map(int, lines[0].split()))
    graph = [[] for i in range(N)]
    for i in range(1, M + 1):
        a, b = [int(x) - 1 for x in lines[i].split()]
        # 0-based indexing
        graph[a].append(b)
        graph[b].append(a)
    ans = 0
    print((dfs(0, ans, 1, N, graph)))
    return


main()

from sys import stdin

N = int()
memo = {}
graph = []


def dfs(e, done):
    if (1 << N) - 1 == done:
        return 1
    key = (e, done)
    if key in memo:
        return memo[key]
    ret = 0
    for s in graph[e]:
        if done >> s & 1:
            continue
        done ^= 1 << s
        ret += dfs(s, done)
        done ^= 1 << s
    memo[key] = ret
    return ret


def main():
    lines = stdin.readlines()
    global N
    N, M = list(map(int, lines[0].split()))
    global graph
    graph = [[] for i in range(N)]
    for i in range(1, M + 1):
        a, b = [int(x) - 1 for x in lines[i].split()]
        # 0-based indexing
        graph[a].append(b)
        graph[b].append(a)
    print((dfs(0, 1)))
    return


main()

+N = int() +memo = {} +graph = [] -def dfs(e, ans, done, N, graph): + +def dfs(e, done): -        ans += 1 -        return ans +        return 1 +    key = (e, done) +    if key in memo: +        return memo[key] +    ret = 0 -        ans = dfs(s, ans, done, N, graph) +        ret += dfs(s, done) -    return ans +    memo[key] = ret +    return ret +    global N +    global graph -    ans = 0 -    print((dfs(0, ans, 1, N, graph))) +    print((dfs(0, 1)))