f=lambda:list(map(int,input().split()))

n,m=f()

g=[[0]*n for _ in range(n)]

for i in range(m):

  a,b=f(); g[a-1][b-1]=g[b-1][a-1]=1

import itertools as it

c=0

for t in it.permutations(list(range(1,n))):

  p,d=0,1

  for q in t: d*=g[p][q]; p=q

  c+=d

print(c)
f=lambda:list(map(int,input().split()))

n,m=f()

g=[[0]*n for _ in range(n)]

for i in range(m):

  a,b=f(); g[a-1][b-1]=g[b-1][a-1]=1

import itertools as it

c=0

for t in it.permutations(list(range(1,n))):

  p=0

  for q in t:

    if g[p][q]<1: break

    p=q

  else: c+=1

print(c)
f = lambda: list(map(int, input().split()))
n, m = f()
g = [[0] * n for _ in range(n)]
for i in range(m):
    a, b = f()
    g[a - 1][b - 1] = g[b - 1][a - 1] = 1
import itertools as it

c = 0
for t in it.permutations(list(range(1, n))):
    p, d = 0, 1
    for q in t:
        d *= g[p][q]
        p = q
    c += d
print(c)

f = lambda: list(map(int, input().split()))
n, m = f()
g = [[0] * n for _ in range(n)]
for i in range(m):
    a, b = f()
    g[a - 1][b - 1] = g[b - 1][a - 1] = 1
import itertools as it

c = 0
for t in it.permutations(list(range(1, n))):
    p = 0
    for q in t:
        if g[p][q] < 1:
            break
        p = q
    else:
        c += 1
print(c)

-    p, d = 0, 1 +    p = 0 -        d *= g[p][q] +        if g[p][q] < 1: +            break -    c += d +    else: +        c += 1