function dp(point, visited, vertexes, memo)
  if not string.find(visited, "0") then
    return 1
  elseif memo[point][visited] then
    return memo[point][visited]
  else
    local ans = 0
    for i = 1, #vertexes[point] do
      if string.sub(visited, vertexes[point][i], vertexes[point][i]) == "0" then
        ans = ans + dp(vertexes[point][i], string.sub(visited, 1, vertexes[point][i] - 1) .. "1" .. string.sub(visited, vertexes[point][i] + 1, #visited), vertexes, memo)
      end
    end
    memo[point][visited] = ans
    return ans
  end
end

function main()
  local input = string.gmatch(io.read(), "[^ ]+")
  local n = tonumber(input())
  local m = tonumber(input())

  local vertexes = {}
  local memo = {}
  for i = 1, n do
    table.insert(vertexes, {})
    table.insert(memo, {})
  end

  for i = 1, m do
    input = string.gmatch(io.read(), "[^ ]+")
    local a = tonumber(input())
    local b = tonumber(input())
    table.insert(vertexes[a], b)
    table.insert(vertexes[b], a)
  end

  local visited = "1"
  for i = 2, n do
    visited = visited .. "0"
  end

  print(dp(1, visited, vertexes, memo))
end

main()
