Question ---------

Given a weighted, un-directed graph G of n nodes and m edges, we say that there is a road from vertex A to vertex B if for a given value r, there exists at-least one path from A to B such that the minimum weight edge in the path is at-least r.
You would be given q queries. Each of them is a value of r.
You need to output 2 integers - number of roads in the graph and number of distinct, un-ordered pairs of vertices A, B such that there exists a road between them.

1\le n, m, q\le 10^5
0\le Weight\ of\ each\ edge \le 10^9