import sys

sys.setrecursionlimit(10**6)

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

S=[[] for _ in range(N)]

for i in range(M):

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

  S[a-1].append((i,b-1))

  S[b-1].append((i,a-1))

  

def dfs(start, goal, exclude):

  for i,b in S[start]:

    if i==exclude or (b in dones):

      continue

    if b==goal:

      dones.append(b)

      break

    else:

      dones.append(b)

      dfs(b,goal,exclude)

  if goal not in dones:

    return True

ans=[]

for i in range(N):

  #m番目の辺について考える

  for m,b in S[i]:

    dones=[]

    is_bridge=dfs(i,b,m)

    #print(is_bridge)

    if is_bridge and m not in ans:

      ans.append(m)

      

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

G=[[] for _ in range(N)]



for i in range(M):

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

  G[a-1].append((i,b-1))

  G[b-1].append((i,a-1))

  

L=[-1]*M

def dfs(start,goal,pre,num):

  if start==goal:

    return False

  done[start]=1

  for i,next_node in G[start]:

    if next_node==pre or i==num or done[next_node]==1:

      continue

    if not dfs(next_node,goal,start,num):

      return False

  return True



for a in range(N):

  for t in G[a]:

    i,b=t

    done=[0]*N

    if L[i]==-1:

      #print(dfs(a,b,-1,i))

      if dfs(a,b,-1,i):

        L[i]=1

      else:

        L[i]=0

print((sum(L)))

#print(L)
import sys

sys.setrecursionlimit(10**6)
N, M = list(map(int, input().split()))
S = [[] for _ in range(N)]
for i in range(M):
    a, b = list(map(int, input().split()))
    S[a - 1].append((i, b - 1))
    S[b - 1].append((i, a - 1))


def dfs(start, goal, exclude):
    for i, b in S[start]:
        if i == exclude or (b in dones):
            continue
        if b == goal:
            dones.append(b)
            break
        else:
            dones.append(b)
            dfs(b, goal, exclude)
    if goal not in dones:
        return True


ans = []
for i in range(N):
    # m番目の辺について考える
    for m, b in S[i]:
        dones = []
        is_bridge = dfs(i, b, m)
        # print(is_bridge)
        if is_bridge and m not in ans:
            ans.append(m)
print((len(ans)))

N, M = list(map(int, input().split()))
G = [[] for _ in range(N)]
for i in range(M):
    a, b = list(map(int, input().split()))
    G[a - 1].append((i, b - 1))
    G[b - 1].append((i, a - 1))
L = [-1] * M


def dfs(start, goal, pre, num):
    if start == goal:
        return False
    done[start] = 1
    for i, next_node in G[start]:
        if next_node == pre or i == num or done[next_node] == 1:
            continue
        if not dfs(next_node, goal, start, num):
            return False
    return True


for a in range(N):
    for t in G[a]:
        i, b = t
        done = [0] * N
        if L[i] == -1:
            # print(dfs(a,b,-1,i))
            if dfs(a, b, -1, i):
                L[i] = 1
            else:
                L[i] = 0
print((sum(L)))
# print(L)

-import sys - -sys.setrecursionlimit(10**6) -S = [[] for _ in range(N)] +G = [[] for _ in range(N)] -    S[a - 1].append((i, b - 1)) -    S[b - 1].append((i, a - 1)) +    G[a - 1].append((i, b - 1)) +    G[b - 1].append((i, a - 1)) +L = [-1] * M -def dfs(start, goal, exclude): -    for i, b in S[start]: -        if i == exclude or (b in dones): +def dfs(start, goal, pre, num): +    if start == goal: +        return False +    done[start] = 1 +    for i, next_node in G[start]: +        if next_node == pre or i == num or done[next_node] == 1: -        if b == goal: -            dones.append(b) -            break -        else: -            dones.append(b) -            dfs(b, goal, exclude) -    if goal not in dones: -        return True +        if not dfs(next_node, goal, start, num): +            return False +    return True -ans = [] -for i in range(N): -    # m番目の辺について考える -    for m, b in S[i]: -        dones = [] -        is_bridge = dfs(i, b, m) -        # print(is_bridge) -        if is_bridge and m not in ans: -            ans.append(m) -print((len(ans))) +for a in range(N): +    for t in G[a]: +        i, b = t +        done = [0] * N +        if L[i] == -1: +            # print(dfs(a,b,-1,i)) +            if dfs(a, b, -1, i): +                L[i] = 1 +            else: +                L[i] = 0 +print((sum(L))) +# print(L)