$24
The description provided for this problem:
Agent Ω's initial attempt to take over the Lion's pride of wardrones ended up failing, but she did learn enough to figure out how to hack into a second, neighboring drone. Now she's going to try again, this time with TWO drones monitoring their neighbors and working together.
You must determine which TWO adjacent drones will allow monitoring of the most pairs of drones as they communicate.
Input Format
The first line contains N, the number of wardrones being analyzed, and M, the number of pairs (edges) that could potentially scan each other's energy signatures.
The next M lines each have two values identifying all pairs of wardrones that could scan each other.
Constraints
1 ≤ N ≤ 200
1 ≤ M ≤ 10,000
0 ≤ drone IDs < N
Output Format
Output the count of how many PAIRS of wardrones could both be scanned if the optimal pair of wardrones were both taken over. You should count the wardrones targeted AND all of its neighbors in the graph.
Example 0
Sample Input
7 8
0 1
0 3
0 4
0 6
2 3
2 4
2 5
3 4
Sample Output
15
Explanation
If wardrones 0 and 3 are infiltrated, they can monitor communications of 6 of the 7 drones (including the two compromised). With six drones, there are (6 x 5)/2 = 15 pairs that can be monitored.