Consider a graph with vertices and edges, where is an integer greater than or equals to .
- The set of vertices is .
- There is an edge with weight between and (for and ).
- There is an edge with weight between and (for and ).
- There is an edge with weight between and (for and ).
For a simple path in this graph, the weight of the path is defined as the product of the weights of the edges that the path traverses.
Determine the number of unordered pairs of distinct vertices such that any simple path from to has a weight that is a square number.