Space Travel
The infrastructure of a cosmic galaxy consists of N planets and M direct interplanetary routes, each connecting exactly two different planets. Given the vast distances in space, if there is no direct connection between two planets, transit planets are used for travel.
The popularity of a planet k is defined as the number of pairs of different planets i and j for which a flight is only possible by passing through planet k (i, j, k=1..N). For the given network of cosmic connections, determine the maximum popularity value and the number of planets that achieve this popularity.
Input data: The first line contains the natural numbers N and M (1<=N<=1000, 1<=M<=5000). The following M lines each contain two natural numbers, describing a direct route between planets i and j (i, j=1..N).
Output data: Provide the solution to the problem.